@@ -60,7 +60,7 @@ public function testCreateStartAndRemoveContainer()
60
60
$ container = Block \await ($ promise , $ this ->loop );
61
61
62
62
$ this ->assertNotNull ($ container ['Id ' ]);
63
- $ this ->assertNull ($ container ['Warnings ' ]);
63
+ $ this ->assertEmpty ($ container ['Warnings ' ]);
64
64
65
65
$ start = microtime (true );
66
66
@@ -108,7 +108,7 @@ public function testStartRunning()
108
108
$ container = Block \await ($ promise , $ this ->loop );
109
109
110
110
$ this ->assertNotNull ($ container ['Id ' ]);
111
- $ this ->assertNull ($ container ['Warnings ' ]);
111
+ $ this ->assertEmpty ($ container ['Warnings ' ]);
112
112
113
113
$ promise = $ this ->client ->containerStart ($ container ['Id ' ]);
114
114
$ ret = Block \await ($ promise , $ this ->loop );
@@ -434,9 +434,6 @@ public function testCreateConnectDisconnectAndRemoveNetwork()
434
434
$ promise = $ this ->client ->containerCreate ($ containerConfig );
435
435
$ container = Block \await ($ promise , $ this ->loop );
436
436
437
- $ promise = $ this ->client ->containerStart ($ container ['Id ' ]);
438
- $ ret = Block \await ($ promise , $ this ->loop );
439
-
440
437
$ start = microtime (true );
441
438
442
439
$ promise = $ this ->client ->networkCreate ($ networkName );
@@ -462,21 +459,16 @@ public function testCreateConnectDisconnectAndRemoveNetwork()
462
459
463
460
$ end = microtime (true );
464
461
465
- $ promise = $ this ->client ->containerStop ($ container ['Id ' ]);
466
- $ ret = Block \await ($ promise , $ this ->loop );
467
-
468
462
$ promise = $ this ->client ->containerRemove ($ container ['Id ' ]);
469
463
$ ret = Block \await ($ promise , $ this ->loop );
470
464
471
465
// get all events between starting and removing for this container
472
466
$ promise = $ this ->client ->events ($ start , $ end , array ('network ' => array ($ network ['Id ' ])));
473
467
$ ret = Block \await ($ promise , $ this ->loop );
474
468
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)
477
470
$ this ->assertEquals (3 , count ($ ret ));
478
471
$ this ->assertEquals ('create ' , $ ret [0 ]['Action ' ]);
479
- //$this->assertEquals('connect', $ret[1]['Action']);
480
472
$ this ->assertEquals ('disconnect ' , $ ret [1 ]['Action ' ]);
481
473
$ this ->assertEquals ('destroy ' , $ ret [2 ]['Action ' ]);
482
474
}
0 commit comments