From dd81f3867c0f22337392568217f242267136333a Mon Sep 17 00:00:00 2001 From: Kirill Sosnovskikh Date: Thu, 8 Aug 2024 15:51:20 +0300 Subject: [PATCH] [#285] Add missing titles to tests Added titles to the following tests: - `test_static_session_token_container_create` - `test_static_session_token_container_create_with_other_verb` - `test_static_session_token_container_create_with_other_wallet` - `test_static_session_token_container_delete` - `test_put_with_bearer_when_eacl_restrict` - `test_shard_errors` Signed-off-by: Kirill Sosnovskikh --- .../services/http_gate/test_http_bearer.py | 1 + .../test_static_session_token_container.py | 5 +++++ pytest_tests/testsuites/shard/test_control_shard.py | 13 ++++--------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/pytest_tests/testsuites/services/http_gate/test_http_bearer.py b/pytest_tests/testsuites/services/http_gate/test_http_bearer.py index 53b2454d..7d5db791 100644 --- a/pytest_tests/testsuites/services/http_gate/test_http_bearer.py +++ b/pytest_tests/testsuites/services/http_gate/test_http_bearer.py @@ -60,6 +60,7 @@ class Test_http_bearer(ClusterTestBase): error_pattern="access to object operation denied", ) + @allure.title("Put object via HTTP using bearer token (object_size={object_size})") def test_put_with_bearer_when_eacl_restrict( self, object_size: ObjectSize, diff --git a/pytest_tests/testsuites/session_token/test_static_session_token_container.py b/pytest_tests/testsuites/session_token/test_static_session_token_container.py index c86f3dd5..1694f623 100644 --- a/pytest_tests/testsuites/session_token/test_static_session_token_container.py +++ b/pytest_tests/testsuites/session_token/test_static_session_token_container.py @@ -1,3 +1,4 @@ +import allure import pytest from frostfs_testlib import reporter from frostfs_testlib.shell import Shell @@ -22,6 +23,7 @@ class TestSessionTokenContainer(ClusterTestBase): """ return {verb: get_container_signed_token(owner_wallet, user_wallet, verb, client_shell, temp_directory) for verb in ContainerVerb} + @allure.title("Static session with create operation") def test_static_session_token_container_create( self, owner_wallet: WalletInfo, @@ -46,6 +48,7 @@ class TestSessionTokenContainer(ClusterTestBase): assert cid not in list_containers(user_wallet, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint) assert cid in list_containers(owner_wallet, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint) + @allure.title("[NEGATIVE] Static session without create operation") def test_static_session_token_container_create_with_other_verb( self, user_wallet: WalletInfo, @@ -65,6 +68,7 @@ class TestSessionTokenContainer(ClusterTestBase): wait_for_creation=False, ) + @allure.title("[NEGATIVE] Static session with create operation for other wallet") def test_static_session_token_container_create_with_other_wallet( self, stranger_wallet: WalletInfo, @@ -83,6 +87,7 @@ class TestSessionTokenContainer(ClusterTestBase): wait_for_creation=False, ) + @allure.title("Static session with delete operation") def test_static_session_token_container_delete( self, owner_wallet: WalletInfo, diff --git a/pytest_tests/testsuites/shard/test_control_shard.py b/pytest_tests/testsuites/shard/test_control_shard.py index 3b96a5e4..8bb8a8a3 100644 --- a/pytest_tests/testsuites/shard/test_control_shard.py +++ b/pytest_tests/testsuites/shard/test_control_shard.py @@ -31,9 +31,7 @@ class TestControlShard(ClusterTestBase): data_path = node.storage_node.get_data_directory() all_datas = node_shell.exec(f"ls -la {data_path}/data | awk '{{ print $9 }}'").stdout.strip() for data_dir in all_datas.replace(".", "").strip().split("\n"): - check_dir = node_shell.exec( - f" [ -d {data_path}/data/{data_dir}/data/{oid_path} ] && echo 1 || echo 0" - ).stdout + check_dir = node_shell.exec(f" [ -d {data_path}/data/{data_dir}/data/{oid_path} ] && echo 1 || echo 0").stdout if "1" in check_dir: object_path = f"{data_path}/data/{data_dir}/data/{oid_path}" object_name = f"{oid[4:]}.{cid}" @@ -66,9 +64,7 @@ class TestControlShard(ClusterTestBase): basic_acl=EACL_PUBLIC_READ_WRITE, ) file = generate_file(round(max_object_size * 0.8)) - oid = put_object( - wallet=default_wallet, path=file, cid=cid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint - ) + oid = put_object(wallet=default_wallet, path=file, cid=cid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint) with reporter.step("Search node with object"): nodes = get_object_nodes(cluster=self.cluster, cid=cid, oid=oid, alive_node=self.cluster.cluster_nodes[0]) @@ -76,9 +72,7 @@ class TestControlShard(ClusterTestBase): object_path, object_name = self.get_object_path_and_name_file(oid, cid, nodes[0]) nodes[0].host.get_shell().exec(f"chmod +r {object_path}/{object_name}") - delete_object( - wallet=default_wallet, cid=cid, oid=oid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint - ) + delete_object(wallet=default_wallet, cid=cid, oid=oid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint) delete_container(wallet=default_wallet, cid=cid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint) @staticmethod @@ -117,6 +111,7 @@ class TestControlShard(ClusterTestBase): assert set(shards_from_config) == set(shards_from_cli) + @allure.title("Set mode shard, after threshold count error") @pytest.mark.failover def test_shard_errors( self,