mirror of https://github.com/docker/compose.git
Merge pull request #501 from aanand/fix-build-error
Fix race condition in cli_test.py
This commit is contained in:
commit
92ae5af019
|
@ -170,7 +170,7 @@ class CLITestCase(DockerClientTestCase):
|
||||||
@patch('dockerpty.start')
|
@patch('dockerpty.start')
|
||||||
def test_run_without_command(self, __):
|
def test_run_without_command(self, __):
|
||||||
self.command.base_dir = 'tests/fixtures/commands-figfile'
|
self.command.base_dir = 'tests/fixtures/commands-figfile'
|
||||||
self.client.build('tests/fixtures/simple-dockerfile', tag='figtest_test')
|
self.check_build('tests/fixtures/simple-dockerfile', tag='figtest_test')
|
||||||
|
|
||||||
for c in self.project.containers(stopped=True, one_off=True):
|
for c in self.project.containers(stopped=True, one_off=True):
|
||||||
c.remove()
|
c.remove()
|
||||||
|
|
|
@ -3,6 +3,7 @@ from __future__ import absolute_import
|
||||||
from docker import Client
|
from docker import Client
|
||||||
from fig.service import Service
|
from fig.service import Service
|
||||||
from fig.cli.utils import docker_url
|
from fig.cli.utils import docker_url
|
||||||
|
from fig.progress_stream import stream_output
|
||||||
from .. import unittest
|
from .. import unittest
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,5 +32,6 @@ class DockerClientTestCase(unittest.TestCase):
|
||||||
**kwargs
|
**kwargs
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def check_build(self, *args, **kwargs):
|
||||||
|
build_output = self.client.build(*args, **kwargs)
|
||||||
|
stream_output(build_output, open('/dev/null', 'w'))
|
||||||
|
|
Loading…
Reference in New Issue