Skip to content

Commit 9891a7e

Browse files
committed
Skip tests when required busybox image is not downloaded yet
1 parent 0f1e1b8 commit 9891a7e

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

tests/FunctionalClientTest.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,23 @@ public function testPing()
3636
$this->loop->run();
3737
}
3838

39+
/**
40+
* @doesNotPerformAssertions
41+
*/
42+
public function testImageInspectCheckIfBusyboxExists()
43+
{
44+
$promise = $this->client->imageInspect('busybox:latest');
45+
46+
try {
47+
Block\await($promise, $this->loop);
48+
} catch (\RuntimeException $e) {
49+
$this->markTestSkipped('Image "busybox" not downloaded yet');
50+
}
51+
}
52+
53+
/**
54+
* @depends testImageInspectCheckIfBusyboxExists
55+
*/
3956
public function testCreateStartAndRemoveContainer()
4057
{
4158
$config = array(
@@ -75,6 +92,9 @@ public function testCreateStartAndRemoveContainer()
7592
$this->assertEquals('destroy', $ret[3]['status']);
7693
}
7794

95+
/**
96+
* @depends testImageInspectCheckIfBusyboxExists
97+
*/
7898
public function testStartRunning()
7999
{
80100
$config = array(
@@ -340,6 +360,7 @@ public function testImageSearch()
340360
}
341361

342362
/**
363+
* @depends testImageInspectCheckIfBusyboxExists
343364
* @doesNotPerformAssertions
344365
*/
345366
public function testImageTag()

0 commit comments

Comments
 (0)