From e8cbd286cda7577d1cde1a962a9a43338e3bb225 Mon Sep 17 00:00:00 2001 From: Vladimir Domnich Date: Thu, 6 Oct 2022 11:31:47 +0400 Subject: [PATCH] [#344] Fix assert for http object not found error Signed-off-by: Vladimir Domnich --- pytest_tests/testsuites/services/test_http_gate.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pytest_tests/testsuites/services/test_http_gate.py b/pytest_tests/testsuites/services/test_http_gate.py index ff01ba3..77a27e5 100644 --- a/pytest_tests/testsuites/services/test_http_gate.py +++ b/pytest_tests/testsuites/services/test_http_gate.py @@ -23,7 +23,7 @@ from utility import wait_for_gc_pass_on_storage_nodes from wellknown_acl import PUBLIC_ACL logger = logging.getLogger("NeoLogger") -OBJECT_NOT_FOUND_ERROR = "object not found" +OBJECT_NOT_FOUND_ERROR = "not found" # For some reason object uploaded via http gateway is not immediately available for downloading # Until this issue is resolved we are waiting for some time before attempting to read an object @@ -233,7 +233,8 @@ class TestHttpGate: get_via_http_gate(cid=cid, oid=oid) raise AssertionError(f"Expected error on getting object with cid: {cid}") except Exception as err: - assert error_pattern in str(err), f"Expected {err} to match {error_pattern}" + match = error_pattern.casefold() in str(err).casefold() + assert match, f"Expected {err} to match {error_pattern}" @staticmethod @allure.step("Verify object can be get using HTTP header attribute")