diff options
| author | Joffrey F <joffrey@docker.com> | 2018-06-28 16:33:06 -0700 |
|---|---|---|
| committer | Joffrey F <joffrey@docker.com> | 2018-06-29 11:30:19 -0700 |
| commit | 180a0fd08510776699ad50e0b2bf655450ad7777 (patch) | |
| tree | dc69a9f712723447f401cb82a9b5e1ca02112590 | |
| parent | 310ea913835be232d3e15b19ad212a48a3906be7 (diff) | |
| download | docker-py-180a0fd08510776699ad50e0b2bf655450ad7777.tar.gz | |
Fix detach assert function to account for new behavior in engine 18.06
Signed-off-by: Joffrey F <joffrey@docker.com>
| -rw-r--r-- | tests/helpers.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/helpers.py b/tests/helpers.py index b6b493b..b36d6d7 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -123,7 +123,12 @@ def assert_cat_socket_detached_with_keys(sock, inputs): sock.sendall(b'make sure the socket is closed\n') else: sock.sendall(b"make sure the socket is closed\n") - assert sock.recv(32) == b'' + data = sock.recv(128) + # New in 18.06: error message is broadcast over the socket when reading + # after detach + assert data == b'' or data.startswith( + b'exec attach failed: error on attach stdin: read escape sequence' + ) def ctrl_with(char): |
