From e195e022cf854d1487fd87d796d8391221797388 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Thu, 28 Jun 2018 16:33:06 -0700 Subject: [PATCH] Fix detach assert function to account for new behavior in engine 18.06 Signed-off-by: Joffrey F --- tests/helpers.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/helpers.py b/tests/helpers.py index b6b493b3..b36d6d78 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):