Fix build against the swarm cluster by joining buffered output before parsing json.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
fe65c0258d
commit
3661e8bc74
7 changed files with 49 additions and 37 deletions
|
|
@ -9,6 +9,8 @@ from compose.config.config import ServiceLoader
|
|||
from compose.const import LABEL_PROJECT
|
||||
from compose.progress_stream import stream_output
|
||||
from compose.service import Service
|
||||
from compose.utils import split_buffer
|
||||
from compose.utils import stream_as_text
|
||||
|
||||
|
||||
def pull_busybox(client):
|
||||
|
|
@ -71,5 +73,5 @@ class DockerClientTestCase(unittest.TestCase):
|
|||
|
||||
def check_build(self, *args, **kwargs):
|
||||
kwargs.setdefault('rm', True)
|
||||
build_output = self.client.build(*args, **kwargs)
|
||||
stream_output(build_output, open('/dev/null', 'w'))
|
||||
build_output = stream_as_text(self.client.build(*args, **kwargs))
|
||||
stream_output(split_buffer(build_output), open('/dev/null', 'w'))
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from __future__ import absolute_import
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from .. import unittest
|
||||
from compose.cli.utils import split_buffer
|
||||
from compose.utils import split_buffer
|
||||
|
||||
|
||||
class SplitBufferTest(unittest.TestCase):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue