From 3944d9ff3be326e3b081ea83e4412297dcc7fef7 Mon Sep 17 00:00:00 2001 From: Ekaterina Chernitsyna Date: Wed, 1 Nov 2023 10:43:43 +0300 Subject: [PATCH] update test_container_creation_deletion_parallel --- .../testsuites/container/test_container.py | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/pytest_tests/testsuites/container/test_container.py b/pytest_tests/testsuites/container/test_container.py index f3314c69..e097b7cc 100644 --- a/pytest_tests/testsuites/container/test_container.py +++ b/pytest_tests/testsuites/container/test_container.py @@ -38,9 +38,7 @@ class TestContainer(ClusterTestBase): endpoint=self.cluster.default_rpc_endpoint, ) - containers = list_containers( - wallet, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint - ) + containers = list_containers(wallet, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint) assert cid in containers, f"Expected container {cid} in containers: {containers}" container_info: str = get_container( @@ -50,9 +48,7 @@ class TestContainer(ClusterTestBase): shell=self.shell, endpoint=self.cluster.default_rpc_endpoint, ) - container_info = ( - container_info.casefold() - ) # To ignore case when comparing with expected values + container_info = container_info.casefold() # To ignore case when comparing with expected values info_to_check = { f"basic ACL: {PRIVATE_ACL_F} (private)", @@ -71,9 +67,7 @@ class TestContainer(ClusterTestBase): for info in info_to_check: expected_info = info.casefold() - assert ( - expected_info in container_info - ), f"Expected {expected_info} in container info:\n{container_info}" + assert expected_info in container_info, f"Expected {expected_info} in container info:\n{container_info}" with allure.step("Delete container and check it was deleted"): delete_container( @@ -84,9 +78,7 @@ class TestContainer(ClusterTestBase): await_mode=True, ) self.tick_epoch() - wait_for_container_deletion( - wallet, cid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint - ) + wait_for_container_deletion(wallet, cid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint) @allure.title("Parallel container creation and deletion") def test_container_creation_deletion_parallel(self, default_wallet: str): @@ -120,10 +112,7 @@ class TestContainer(ClusterTestBase): with allure.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 - ) + delete_container(wallet, cid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint) self.tick_epoch() - wait_for_container_deletion( - wallet, cid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint - ) + for cid in cids: + wait_for_container_deletion(wallet, cid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint)