|
@@ 92-103 (lines=12) @@
|
| 89 |
|
} |
| 90 |
|
} |
| 91 |
|
|
| 92 |
|
public function testStart() |
| 93 |
|
{ |
| 94 |
|
$container = new Container(['Image' => 'ubuntu:precise', 'Cmd' => ['/bin/true']]); |
| 95 |
|
|
| 96 |
|
$manager = $this->getManager(); |
| 97 |
|
$manager->create($container); |
| 98 |
|
$manager->start($container); |
| 99 |
|
|
| 100 |
|
$runtimeInformations = $container->getRuntimeInformations(); |
| 101 |
|
|
| 102 |
|
$this->assertEquals(0, $runtimeInformations['State']['ExitCode']); |
| 103 |
|
} |
| 104 |
|
|
| 105 |
|
public function testRunDefault() |
| 106 |
|
{ |
|
@@ 249-260 (lines=12) @@
|
| 246 |
|
* Not sure how to reliably test that we actually waited for the container |
| 247 |
|
* but this should at least ensure no exception is thrown |
| 248 |
|
*/ |
| 249 |
|
public function testWait() |
| 250 |
|
{ |
| 251 |
|
$container = new Container(['Image' => 'ubuntu:precise', 'Cmd' => ['/bin/sleep', '1']]); |
| 252 |
|
|
| 253 |
|
$manager = $this->getManager(); |
| 254 |
|
$manager->run($container); |
| 255 |
|
$manager->wait($container); |
| 256 |
|
|
| 257 |
|
$runtimeInformations = $container->getRuntimeInformations(); |
| 258 |
|
|
| 259 |
|
$this->assertEquals(0, $runtimeInformations['State']['ExitCode']); |
| 260 |
|
} |
| 261 |
|
|
| 262 |
|
/** |
| 263 |
|
* @expectedException GuzzleHttp\Exception\RequestException |