From ddaa1a85a1ccaf393cb23aad73f513f2c4a3e3e5 Mon Sep 17 00:00:00 2001 From: Kirill Sosnovskikh Date: Mon, 12 Aug 2024 12:56:33 +0300 Subject: [PATCH] [#288] Add static title for test `test_container_creation` Signed-off-by: Kirill Sosnovskikh --- .../testsuites/container/test_container.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/pytest_tests/testsuites/container/test_container.py b/pytest_tests/testsuites/container/test_container.py index 8dc07699..1b641bb2 100644 --- a/pytest_tests/testsuites/container/test_container.py +++ b/pytest_tests/testsuites/container/test_container.py @@ -19,12 +19,10 @@ from pytest_tests.helpers.utility import placement_policy_from_container @pytest.mark.container @pytest.mark.sanity class TestContainer(ClusterTestBase): + @allure.title("Create container (name={name})") @pytest.mark.parametrize("name", ["", "test-container"], ids=["No name", "Set particular name"]) @pytest.mark.smoke def test_container_creation(self, default_wallet: WalletInfo, name: str): - scenario_title = "with name" if name else "without name" - allure.dynamic.title(f"Create container {scenario_title}") - wallet = default_wallet placement_rule = "REP 2 IN X CBF 1 SELECT 2 FROM * AS X" @@ -59,9 +57,7 @@ class TestContainer(ClusterTestBase): with reporter.step("Check container has correct information"): expected_policy = placement_rule.casefold() actual_policy = placement_policy_from_container(container_info) - assert ( - actual_policy == expected_policy - ), f"Expected policy\n{expected_policy} but got policy\n{actual_policy}" + assert actual_policy == expected_policy, f"Expected policy\n{expected_policy} but got policy\n{actual_policy}" for info in info_to_check: expected_info = info.casefold() @@ -112,10 +108,6 @@ class TestContainer(ClusterTestBase): with reporter.step("Delete containers and check they were deleted"): for cid in cids: - delete_container( - wallet, cid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint, await_mode=True - ) - containers_list = list_containers( - wallet, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint - ) + delete_container(wallet, cid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint, await_mode=True) + containers_list = list_containers(wallet, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint) assert cid not in containers_list, "Container not deleted"