From e99cc7d05db890aa9b3815bd2e85513d4bafc44e Mon Sep 17 00:00:00 2001 From: Andrey Berezin Date: Thu, 8 Dec 2022 13:21:38 +0300 Subject: [PATCH] Small fixes for tests Signed-off-by: Andrey Berezin --- .../object/test_object_api_bearer.py | 6 ++---- .../testsuites/object/test_object_lifetime.py | 2 +- .../test_static_object_session_token.py | 20 ++++++++++--------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pytest_tests/testsuites/object/test_object_api_bearer.py b/pytest_tests/testsuites/object/test_object_api_bearer.py index 153fc152..61232bac 100644 --- a/pytest_tests/testsuites/object/test_object_api_bearer.py +++ b/pytest_tests/testsuites/object/test_object_api_bearer.py @@ -98,8 +98,7 @@ class TestObjectApiWithBearerToken(ClusterTestBase): request: FixtureRequest, ): allure.dynamic.title( - f"Check that objects can be deleted from any node using s3gate wallet with bearer " - f"token for {request.node.callspec.id}" + f"Object can be deleted from any node using s3gate wallet with bearer token for {request.node.callspec.id}" ) s3_gate_wallet = self.cluster.s3gates[0] @@ -135,8 +134,7 @@ class TestObjectApiWithBearerToken(ClusterTestBase): request: FixtureRequest, ): allure.dynamic.title( - "Check that objects can be deleted from any node using s3gate wallet with bearer " - f"token for {request.node.callspec.id}" + f"Object can be fetched from any node using s3gate wallet with bearer token for {request.node.callspec.id}" ) s3_gate_wallet = self.cluster.s3gates[0] diff --git a/pytest_tests/testsuites/object/test_object_lifetime.py b/pytest_tests/testsuites/object/test_object_lifetime.py index 65fab1ce..92ce5e66 100644 --- a/pytest_tests/testsuites/object/test_object_lifetime.py +++ b/pytest_tests/testsuites/object/test_object_lifetime.py @@ -17,7 +17,7 @@ logger = logging.getLogger("NeoLogger") @pytest.mark.sanity @pytest.mark.grpc_api -class ObjectApiLifetimeTest(ClusterTestBase): +class TestObjectApiLifetime(ClusterTestBase): @allure.title("Test object life time") @pytest.mark.parametrize( "object_size", diff --git a/pytest_tests/testsuites/session_token/test_static_object_session_token.py b/pytest_tests/testsuites/session_token/test_static_object_session_token.py index eaeb432e..9107b065 100644 --- a/pytest_tests/testsuites/session_token/test_static_object_session_token.py +++ b/pytest_tests/testsuites/session_token/test_static_object_session_token.py @@ -20,6 +20,7 @@ from python_keywords.neofs_verbs import ( put_object_to_random_node, search_object, ) +from test_control import expect_not_raises from wallet import WalletFile from helpers.storage_object_info import StorageObjectInfo @@ -209,15 +210,16 @@ class TestObjectStaticSession(ClusterTestBase): for range_to_test in ranges_to_test: with allure.step(f"Check range {range_to_test}"): - method_under_test( - user_wallet.path, - storage_object.cid, - storage_object.oid, - shell=self.shell, - endpoint=self.cluster.default_rpc_endpoint, - session=static_sessions[verb], - range_cut=range_to_test, - ) + with expect_not_raises(): + method_under_test( + user_wallet.path, + storage_object.cid, + storage_object.oid, + shell=self.shell, + endpoint=self.cluster.default_rpc_endpoint, + session=static_sessions[verb], + range_cut=range_to_test, + ) @allure.title("Validate static session with search operation") @pytest.mark.static_session