Add tests with empty map #22

Merged
anikeev-yadro merged 1 commit from anikeev-yadro/frostfs-testcases:anikeev/add_dataloss_test into master 2023-03-20 10:02:23 +00:00
Member

Add new tests that cover the dataloss in empty map situation
https://github.com/nspcc-dev/neofs-node/issues/2267

Signed-off-by: anikeev-yadro a.anikeev@yadro.com

Add new tests that cover the dataloss in empty map situation https://github.com/nspcc-dev/neofs-node/issues/2267 Signed-off-by: anikeev-yadro <a.anikeev@yadro.com>
anikeev-yadro requested review from fyrchik 2023-03-16 07:24:18 +00:00
anikeev-yadro requested review from JuliaKovshova 2023-03-16 07:24:18 +00:00
anikeev-yadro requested review from abereziny 2023-03-16 07:24:19 +00:00
anikeev-yadro force-pushed anikeev/add_dataloss_test from 0972a0e651 to 2d2c9043ca 2023-03-16 07:24:41 +00:00 Compare
anikeev-yadro force-pushed anikeev/add_dataloss_test from 2d2c9043ca to 44a94de520 2023-03-16 07:25:43 +00:00 Compare
abereziny reviewed 2023-03-16 08:12:23 +00:00
@ -214,0 +263,4 @@
remote_shell = alive_node.host.get_shell()
node_netmap_keys = list(map(StorageNode.get_wallet_public_key, remove_nodes))
logger.info(f"Nodes netmap keys is: {' '.join(node_netmap_keys)}")
Member

"keys are"

"keys are"
Author
Member

fixed

fixed
anikeev-yadro marked this conversation as resolved
abereziny reviewed 2023-03-16 08:15:03 +00:00
@ -214,0 +233,4 @@
), f"Expected node with key {node_netmap_key} to be NOT in network map"
@allure.step("Wait for node {node} is ready")
def wait_for_node_to_be_ready(node: StorageNode) -> None:
Member
We already have such method here: https://git.frostfs.info/TrueCloudLab/frostfs-testcases/src/branch/master/pytest_tests/testsuites/network/test_node_management.py#L455
Author
Member

method moved from test_node_management.py to node_management.py

method moved from test_node_management.py to node_management.py
anikeev-yadro marked this conversation as resolved
abereziny reviewed 2023-03-16 08:15:59 +00:00
@ -111,3 +112,3 @@
"""
pass
def get_remote_config_path(self) -> str:
Member

Looks like it should be moved to NodeBase class (every node have config)

Looks like it should be moved to NodeBase class (every node have config)
Author
Member

deleted. It has already in NodeBase class.

deleted. It has already in NodeBase class.
anikeev-yadro marked this conversation as resolved
abereziny reviewed 2023-03-16 08:19:53 +00:00
@ -176,0 +325,4 @@
check_objects_in_bucket(self.s3_client, bucket, bucket_objects)
@allure.step("Return all nodes to cluster")
def return_nodes_after_stop(self, return_nodes = None) -> None:
Member

Also need to ensure that nodes will be returned in case if test fails (fixture which will call this method after test end)

Also need to ensure that nodes will be returned in case if test fails (fixture which will call this method after test end)
Author
Member

added tear down procedure to both tests

added tear down procedure to both tests
anikeev-yadro marked this conversation as resolved
anikeev-yadro force-pushed anikeev/add_dataloss_test from 44a94de520 to a5a169c29f 2023-03-16 08:57:41 +00:00 Compare
JuliaKovshova reviewed 2023-03-16 09:17:00 +00:00
@ -114,0 +127,4 @@
config = yaml.safe_load(contents)
value = config["netmap_cleaner"]["threshold"]
#netmap_cleaner:
Member

нам нужно это?

нам нужно это?
Author
Member

deleted

deleted
anikeev-yadro marked this conversation as resolved
anikeev-yadro force-pushed anikeev/add_dataloss_test from a5a169c29f to 75abf78244 2023-03-16 13:39:28 +00:00 Compare
anikeev-yadro scheduled this pull request to auto merge when all checks succeed 2023-03-16 13:41:06 +00:00
anikeev-yadro canceled auto merging this pull request when all checks succeed 2023-03-16 13:41:21 +00:00
abereziny reviewed 2023-03-16 15:04:32 +00:00
@ -22,3 +54,3 @@
@allure.step("Return all stopped hosts")
@pytest.fixture(scope="function", autouse=True)
@pytest.fixture(scope="class", autouse=True)
Member

Why change to class?

Why change to class?
Author
Member

this is my mistake. Reverted back

this is my mistake. Reverted back
anikeev-yadro marked this conversation as resolved
anikeev-yadro force-pushed anikeev/add_dataloss_test from 75abf78244 to a07538296b 2023-03-16 15:41:29 +00:00 Compare
JuliaKovshova approved these changes 2023-03-17 07:14:15 +00:00
anikeev-yadro force-pushed anikeev/add_dataloss_test from a07538296b to eb464f422c 2023-03-17 15:00:52 +00:00 Compare
abereziny approved these changes 2023-03-20 08:03:37 +00:00
JuliaKovshova approved these changes 2023-03-20 09:58:25 +00:00
anikeev-yadro merged commit eb464f422c into master 2023-03-20 10:02:23 +00:00
anikeev-yadro deleted branch anikeev/add_dataloss_test 2023-03-20 10:02:24 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-testcases#22
No description provided.