forked from TrueCloudLab/frostfs-testcases
update test_container_creation_deletion_parallel
This commit is contained in:
parent
ae57672c7d
commit
3944d9ff3b
1 changed files with 7 additions and 18 deletions
|
@ -38,9 +38,7 @@ class TestContainer(ClusterTestBase):
|
||||||
endpoint=self.cluster.default_rpc_endpoint,
|
endpoint=self.cluster.default_rpc_endpoint,
|
||||||
)
|
)
|
||||||
|
|
||||||
containers = list_containers(
|
containers = list_containers(wallet, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint)
|
||||||
wallet, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint
|
|
||||||
)
|
|
||||||
assert cid in containers, f"Expected container {cid} in containers: {containers}"
|
assert cid in containers, f"Expected container {cid} in containers: {containers}"
|
||||||
|
|
||||||
container_info: str = get_container(
|
container_info: str = get_container(
|
||||||
|
@ -50,9 +48,7 @@ class TestContainer(ClusterTestBase):
|
||||||
shell=self.shell,
|
shell=self.shell,
|
||||||
endpoint=self.cluster.default_rpc_endpoint,
|
endpoint=self.cluster.default_rpc_endpoint,
|
||||||
)
|
)
|
||||||
container_info = (
|
container_info = container_info.casefold() # To ignore case when comparing with expected values
|
||||||
container_info.casefold()
|
|
||||||
) # To ignore case when comparing with expected values
|
|
||||||
|
|
||||||
info_to_check = {
|
info_to_check = {
|
||||||
f"basic ACL: {PRIVATE_ACL_F} (private)",
|
f"basic ACL: {PRIVATE_ACL_F} (private)",
|
||||||
|
@ -71,9 +67,7 @@ class TestContainer(ClusterTestBase):
|
||||||
|
|
||||||
for info in info_to_check:
|
for info in info_to_check:
|
||||||
expected_info = info.casefold()
|
expected_info = info.casefold()
|
||||||
assert (
|
assert expected_info in container_info, f"Expected {expected_info} in container info:\n{container_info}"
|
||||||
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"):
|
with allure.step("Delete container and check it was deleted"):
|
||||||
delete_container(
|
delete_container(
|
||||||
|
@ -84,9 +78,7 @@ class TestContainer(ClusterTestBase):
|
||||||
await_mode=True,
|
await_mode=True,
|
||||||
)
|
)
|
||||||
self.tick_epoch()
|
self.tick_epoch()
|
||||||
wait_for_container_deletion(
|
wait_for_container_deletion(wallet, cid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint)
|
||||||
wallet, cid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint
|
|
||||||
)
|
|
||||||
|
|
||||||
@allure.title("Parallel container creation and deletion")
|
@allure.title("Parallel container creation and deletion")
|
||||||
def test_container_creation_deletion_parallel(self, default_wallet: str):
|
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"):
|
with allure.step("Delete containers and check they were deleted"):
|
||||||
for cid in cids:
|
for cid in cids:
|
||||||
delete_container(
|
delete_container(wallet, cid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint)
|
||||||
wallet, cid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint
|
|
||||||
)
|
|
||||||
self.tick_epoch()
|
self.tick_epoch()
|
||||||
wait_for_container_deletion(
|
for cid in cids:
|
||||||
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)
|
||||||
)
|
|
||||||
|
|
Loading…
Reference in a new issue