From 8afba7fca619362564584becf570566fc1e42d83 Mon Sep 17 00:00:00 2001 From: Vladimir Domnich Date: Thu, 21 Jul 2022 16:25:17 +0400 Subject: [PATCH] Fix assert that checks presence of node in netmap We should be looking for node host rather than for node name that we assigned in tests code. Signed-off-by: Vladimir Domnich --- .../testsuites/network/test_node_management.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pytest_tests/testsuites/network/test_node_management.py b/pytest_tests/testsuites/network/test_node_management.py index a43cacb..496a9a9 100644 --- a/pytest_tests/testsuites/network/test_node_management.py +++ b/pytest_tests/testsuites/network/test_node_management.py @@ -80,8 +80,11 @@ def test_nodes_management(prepare_tmp_dir): """ random_node = choice(list(NEOFS_NETMAP_DICT)) alive_node = choice([node for node in NEOFS_NETMAP_DICT if node != random_node]) - snapshot = get_netmap_snapshot(node_name=alive_node) - assert random_node in snapshot, f'Expected node {random_node} in netmap' + + with allure.step('Check node {random_node} is in netmap'): + random_node_host = NEOFS_NETMAP_DICT[random_node]['rpc'].split(':')[0] + snapshot = get_netmap_snapshot(node_name=alive_node) + assert random_node_host in snapshot, f'Expected node {random_node} in netmap' with allure.step('Run health check for all storage nodes'): for node_name in NEOFS_NETMAP_DICT.keys(): @@ -242,9 +245,6 @@ def test_drop_object(prepare_wallet_and_deposit): @pytest.mark.skip(reason='Need to clarify scenario') @allure.title('Control Operations with storage nodes') def test_shards(prepare_wallet_and_deposit, crate_container_and_pick_node): - """ - This test checks base control operations with storage nodes (healthcheck, netmap-snapshot, set-status). - """ wallet = prepare_wallet_and_deposit file_path = generate_file()