[#XX] Add static title for test test_container_creation
Some checks reported warnings
DCO check / Commits Check (pull_request) Has been cancelled
Some checks reported warnings
DCO check / Commits Check (pull_request) Has been cancelled
Signed-off-by: Kirill Sosnovskikh <k.sosnovskikh@yadro.com>
This commit is contained in:
parent
6a372cc1c0
commit
7bb59214a5
1 changed files with 4 additions and 12 deletions
|
@ -19,12 +19,10 @@ from pytest_tests.helpers.utility import placement_policy_from_container
|
||||||
@pytest.mark.container
|
@pytest.mark.container
|
||||||
@pytest.mark.sanity
|
@pytest.mark.sanity
|
||||||
class TestContainer(ClusterTestBase):
|
class TestContainer(ClusterTestBase):
|
||||||
|
@allure.title("Create container (name={name})")
|
||||||
@pytest.mark.parametrize("name", ["", "test-container"], ids=["No name", "Set particular name"])
|
@pytest.mark.parametrize("name", ["", "test-container"], ids=["No name", "Set particular name"])
|
||||||
@pytest.mark.smoke
|
@pytest.mark.smoke
|
||||||
def test_container_creation(self, default_wallet: WalletInfo, name: str):
|
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
|
wallet = default_wallet
|
||||||
|
|
||||||
placement_rule = "REP 2 IN X CBF 1 SELECT 2 FROM * AS X"
|
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"):
|
with reporter.step("Check container has correct information"):
|
||||||
expected_policy = placement_rule.casefold()
|
expected_policy = placement_rule.casefold()
|
||||||
actual_policy = placement_policy_from_container(container_info)
|
actual_policy = placement_policy_from_container(container_info)
|
||||||
assert (
|
assert actual_policy == expected_policy, f"Expected policy\n{expected_policy} but got policy\n{actual_policy}"
|
||||||
actual_policy == expected_policy
|
|
||||||
), f"Expected policy\n{expected_policy} but got policy\n{actual_policy}"
|
|
||||||
|
|
||||||
for info in info_to_check:
|
for info in info_to_check:
|
||||||
expected_info = info.casefold()
|
expected_info = info.casefold()
|
||||||
|
@ -112,10 +108,6 @@ class TestContainer(ClusterTestBase):
|
||||||
|
|
||||||
with reporter.step("Delete containers and check they were deleted"):
|
with reporter.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, await_mode=True)
|
||||||
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)
|
||||||
)
|
|
||||||
containers_list = list_containers(
|
|
||||||
wallet, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint
|
|
||||||
)
|
|
||||||
assert cid not in containers_list, "Container not deleted"
|
assert cid not in containers_list, "Container not deleted"
|
||||||
|
|
Loading…
Reference in a new issue