mirror of https://github.com/docker/docker-py.git
Merge pull request #3008 from milas/flaky-tests
test: fix a couple flaky/broken tests
This commit is contained in:
commit
cf6210316f
|
|
@ -1217,12 +1217,14 @@ class AttachContainerTest(BaseAPIIntegrationTest):
|
||||||
data = read_exactly(pty_stdout, next_size)
|
data = read_exactly(pty_stdout, next_size)
|
||||||
assert data.decode('utf-8') == line
|
assert data.decode('utf-8') == line
|
||||||
|
|
||||||
|
@pytest.mark.timeout(10)
|
||||||
def test_attach_no_stream(self):
|
def test_attach_no_stream(self):
|
||||||
container = self.client.create_container(
|
container = self.client.create_container(
|
||||||
TEST_IMG, 'echo hello'
|
TEST_IMG, 'echo hello'
|
||||||
)
|
)
|
||||||
self.tmp_containers.append(container)
|
self.tmp_containers.append(container)
|
||||||
self.client.start(container)
|
self.client.start(container)
|
||||||
|
self.client.wait(container, condition='not-running')
|
||||||
output = self.client.attach(container, stream=False, logs=True)
|
output = self.client.attach(container, stream=False, logs=True)
|
||||||
assert output == 'hello\n'.encode(encoding='ascii')
|
assert output == 'hello\n'.encode(encoding='ascii')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import pytest
|
||||||
|
|
||||||
|
|
||||||
class TestRegressions(BaseAPIIntegrationTest):
|
class TestRegressions(BaseAPIIntegrationTest):
|
||||||
|
@pytest.mark.xfail(True, reason='Docker API always returns chunked resp')
|
||||||
def test_443_handle_nonchunked_response_in_stream(self):
|
def test_443_handle_nonchunked_response_in_stream(self):
|
||||||
dfile = io.BytesIO()
|
dfile = io.BytesIO()
|
||||||
with pytest.raises(docker.errors.APIError) as exc:
|
with pytest.raises(docker.errors.APIError) as exc:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue