diff options
author | Joffrey F <joffrey@docker.com> | 2018-10-31 17:08:52 -0700 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2018-11-28 11:56:08 -0800 |
commit | c9edc9c748ca2eea97ed130fd526aeb4eabae80d (patch) | |
tree | a29b174f744fe4ab341715badb4a5afedfd20255 | |
parent | 2b2d711a5ba8be5cebe5913870c4dea1b9498af1 (diff) | |
download | docker-py-c9edc9c748ca2eea97ed130fd526aeb4eabae80d.tar.gz |
Update tests for ssh protocol compatibility
Signed-off-by: Joffrey F <joffrey@docker.com>
-rw-r--r-- | tests/helpers.py | 4 | ||||
-rw-r--r-- | tests/integration/api_container_test.py | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/helpers.py b/tests/helpers.py index b36d6d7..f912bd8 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -10,6 +10,7 @@ import six import socket import docker +import paramiko import pytest @@ -121,6 +122,9 @@ def assert_cat_socket_detached_with_keys(sock, inputs): if getattr(sock, 'family', -9) == getattr(socket, 'AF_UNIX', -1): with pytest.raises(socket.error): sock.sendall(b'make sure the socket is closed\n') + elif isinstance(sock, paramiko.Channel): + with pytest.raises(OSError): + sock.sendall(b'make sure the socket is closed\n') else: sock.sendall(b"make sure the socket is closed\n") data = sock.recv(128) diff --git a/tests/integration/api_container_test.py b/tests/integration/api_container_test.py index 6ce846b..249ef7c 100644 --- a/tests/integration/api_container_test.py +++ b/tests/integration/api_container_test.py @@ -1255,6 +1255,7 @@ class AttachContainerTest(BaseAPIIntegrationTest): assert output == 'hello\n'.encode(encoding='ascii') @pytest.mark.timeout(5) + @pytest.mark.xfail(True, reason='Cancellable events broken over SSH') def test_attach_stream_and_cancel(self): container = self.client.create_container( BUSYBOX, 'sh -c "echo hello && sleep 60"', |