Fix race condition in cli_test.py

We weren't waiting for the build to finish, causing the rest of the test
to occasionally fail when looking for the image.

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
Aanand Prasad 2014-09-26 10:58:52 -07:00
commit 537d435a28
2 changed files with 5 additions and 3 deletions

View file

@ -3,6 +3,7 @@ from __future__ import absolute_import
from docker import Client
from fig.service import Service
from fig.cli.utils import docker_url
from fig.progress_stream import stream_output
from .. import unittest
@ -31,5 +32,6 @@ class DockerClientTestCase(unittest.TestCase):
**kwargs
)
def check_build(self, *args, **kwargs):
build_output = self.client.build(*args, **kwargs)
stream_output(build_output, open('/dev/null', 'w'))