Skip to content

Commit 0bfc2b2

Browse files
committed
Fix failing tests with new Docker Engine API
1 parent 43a47f4 commit 0bfc2b2

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

tests/FunctionalClientTest.php

+3-11
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function testCreateStartAndRemoveContainer()
6060
$container = Block\await($promise, $this->loop);
6161

6262
$this->assertNotNull($container['Id']);
63-
$this->assertNull($container['Warnings']);
63+
$this->assertEmpty($container['Warnings']);
6464

6565
$start = microtime(true);
6666

@@ -108,7 +108,7 @@ public function testStartRunning()
108108
$container = Block\await($promise, $this->loop);
109109

110110
$this->assertNotNull($container['Id']);
111-
$this->assertNull($container['Warnings']);
111+
$this->assertEmpty($container['Warnings']);
112112

113113
$promise = $this->client->containerStart($container['Id']);
114114
$ret = Block\await($promise, $this->loop);
@@ -434,9 +434,6 @@ public function testCreateConnectDisconnectAndRemoveNetwork()
434434
$promise = $this->client->containerCreate($containerConfig);
435435
$container = Block\await($promise, $this->loop);
436436

437-
$promise = $this->client->containerStart($container['Id']);
438-
$ret = Block\await($promise, $this->loop);
439-
440437
$start = microtime(true);
441438

442439
$promise = $this->client->networkCreate($networkName);
@@ -462,21 +459,16 @@ public function testCreateConnectDisconnectAndRemoveNetwork()
462459

463460
$end = microtime(true);
464461

465-
$promise = $this->client->containerStop($container['Id']);
466-
$ret = Block\await($promise, $this->loop);
467-
468462
$promise = $this->client->containerRemove($container['Id']);
469463
$ret = Block\await($promise, $this->loop);
470464

471465
// get all events between starting and removing for this container
472466
$promise = $this->client->events($start, $end, array('network' => array($network['Id'])));
473467
$ret = Block\await($promise, $this->loop);
474468

475-
// expects "create", "connect", "disconnect", "destroy" events
476-
//$this->assertEquals(4, count($ret));
469+
// expects "create", "disconnect", "destroy" events ("connect" will be skipped because we don't start the container)
477470
$this->assertEquals(3, count($ret));
478471
$this->assertEquals('create', $ret[0]['Action']);
479-
//$this->assertEquals('connect', $ret[1]['Action']);
480472
$this->assertEquals('disconnect', $ret[1]['Action']);
481473
$this->assertEquals('destroy', $ret[2]['Action']);
482474
}

0 commit comments

Comments
 (0)