From 26d8045ffa99ec402e451cde67415b14b13cc95a Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 17 Jul 2020 14:25:27 +0200 Subject: [PATCH] Fix CreateContainerTest.test_invalid_log_driver_raises_exception This test was updated in 7d92fbdee1b8621f54faa595ba53d7ef78ef1acc, but omitted the "error" prefix in the message, causing the test to fail; _________ CreateContainerTest.test_invalid_log_driver_raises_exception _________ tests/integration/api_container_test.py:293: in test_invalid_log_driver_raises_exception assert excinfo.value.explanation in expected_msgs E AssertionError: assert 'error looking up logging plugin asdf: plugin "asdf" not found' in ["logger: no log driver named 'asdf' is registered", 'looking up logging plugin asdf: plugin "asdf" not found'] E + where 'error looking up logging plugin asdf: plugin "asdf" not found' = APIError(HTTPError('400 Client Error: Bad Request for url: http+docker://localhost/v1.39/containers/create')).explanation E + where APIError(HTTPError('400 Client Error: Bad Request for url: http+docker://localhost/v1.39/containers/create')) = .value Signed-off-by: Sebastiaan van Stijn --- tests/integration/api_container_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/api_container_test.py b/tests/integration/api_container_test.py index 411d4c2e..65e611b2 100644 --- a/tests/integration/api_container_test.py +++ b/tests/integration/api_container_test.py @@ -279,7 +279,7 @@ class CreateContainerTest(BaseAPIIntegrationTest): expected_msgs = [ "logger: no log driver named 'asdf' is registered", - "looking up logging plugin asdf: plugin \"asdf\" not found", + "error looking up logging plugin asdf: plugin \"asdf\" not found", ] with pytest.raises(docker.errors.APIError) as excinfo: # raises an internal server error 500