Skip to content

Commit 92ae5af

Browse files
committed
Merge pull request #501 from aanand/fix-build-error
Fix race condition in cli_test.py
2 parents 5d76d18 + 537d435 commit 92ae5af

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

tests/integration/cli_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def test_run_does_not_recreate_linked_containers(self, __):
170170
@patch('dockerpty.start')
171171
def test_run_without_command(self, __):
172172
self.command.base_dir = 'tests/fixtures/commands-figfile'
173-
self.client.build('tests/fixtures/simple-dockerfile', tag='figtest_test')
173+
self.check_build('tests/fixtures/simple-dockerfile', tag='figtest_test')
174174

175175
for c in self.project.containers(stopped=True, one_off=True):
176176
c.remove()

tests/integration/testcases.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from docker import Client
44
from fig.service import Service
55
from fig.cli.utils import docker_url
6+
from fig.progress_stream import stream_output
67
from .. import unittest
78

89

@@ -31,5 +32,6 @@ def create_service(self, name, **kwargs):
3132
**kwargs
3233
)
3334

34-
35-
35+
def check_build(self, *args, **kwargs):
36+
build_output = self.client.build(*args, **kwargs)
37+
stream_output(build_output, open('/dev/null', 'w'))

0 commit comments

Comments
 (0)