diff --git a/pytest_tests/tests/failovers/test_failover_network.py b/pytest_tests/tests/failovers/test_failover_network.py index f4a4c8472..ef28cc350 100644 --- a/pytest_tests/tests/failovers/test_failover_network.py +++ b/pytest_tests/tests/failovers/test_failover_network.py @@ -1,5 +1,6 @@ import logging import subprocess +import sys from random import choices from time import sleep @@ -21,7 +22,7 @@ @pytest.mark.failover @pytest.mark.failover_network -@pytest.mark.skip(reason="These tests require multiple hosts/inner rings to run") +@pytest.mark.skipif(sys.platform == "darwin", reason="not supported on macos runners") class TestFailoverNetwork(NeofsEnvTestBase): @pytest.fixture(autouse=True) @allure.step("Restore network") @@ -56,7 +57,9 @@ def test_block_storage_node_traffic(self, default_wallet, simple_object_size): ) oid = put_object_to_random_node(wallet.path, source_file_path, cid, shell=self.shell, neofs_env=self.neofs_env) - nodes = wait_object_replication(cid, oid, 2, shell=self.shell, nodes=self.neofs_env.storage_nodes) + nodes = wait_object_replication( + cid, oid, 2, shell=self.shell, nodes=self.neofs_env.storage_nodes, neofs_env=self.neofs_env + ) logger.info(f"Nodes are {nodes}") nodes_to_block = nodes @@ -79,11 +82,12 @@ def test_block_storage_node_traffic(self, default_wallet, simple_object_size): 2, shell=self.shell, nodes=list(set(self.neofs_env.storage_nodes) - set(excluded_nodes)), + neofs_env=self.neofs_env, ) assert node not in new_nodes with allure.step("Check object data is not corrupted"): - got_file_path = get_object(wallet, cid, oid, endpoint=new_nodes[0].endpoint, shell=self.shell) + got_file_path = get_object(wallet.path, cid, oid, endpoint=new_nodes[0].endpoint, shell=self.shell) assert get_file_hash(source_file_path) == get_file_hash(got_file_path) for node in nodes_to_block: @@ -93,9 +97,11 @@ def test_block_storage_node_traffic(self, default_wallet, simple_object_size): sleep(wakeup_node_timeout) with allure.step("Check object data is not corrupted"): - new_nodes = wait_object_replication(cid, oid, 2, shell=self.shell, nodes=self.neofs_env.storage_nodes) + new_nodes = wait_object_replication( + cid, oid, 2, shell=self.shell, nodes=self.neofs_env.storage_nodes, neofs_env=self.neofs_env + ) - got_file_path = get_object(wallet, cid, oid, shell=self.shell, endpoint=new_nodes[0].endpoint) + got_file_path = get_object(wallet.path, cid, oid, shell=self.shell, endpoint=new_nodes[0].endpoint) assert get_file_hash(source_file_path) == get_file_hash(got_file_path) @pytest.mark.sanity @@ -118,7 +124,6 @@ def test_rpc_reconnection(self, default_wallet): "inner_ring_candidate_fee", "maximum_object_size", "withdrawal_fee", - "systemdns", "homomorphic_hashing_disabled", "maintenance_mode_allowed", ] @@ -130,7 +135,7 @@ def test_rpc_reconnection(self, default_wallet): morph_chain_port = self.neofs_env.inner_ring_nodes[0].rpc_address.split(":")[1] with allure.step( - f"Disconnecting storage node {storage_node.name} " f"from {morph_chain_addr} {dport_repeat} times" + f"Disconnecting storage node {storage_node} " f"from {morph_chain_addr} {dport_repeat} times" ): for repeat in range(dport_repeat): with allure.step(f"Disconnect number {repeat}"): @@ -156,8 +161,7 @@ def test_rpc_reconnection(self, default_wallet): # Delay between shutdown attempts, emulates a real disconnection sleep(1) logger.info( - f"Disconnected storage node {storage_node.name} " - f"from {morph_chain_addr} {dport_repeat} times" + f"Disconnected storage node {storage_node} " f"from {morph_chain_addr} {dport_repeat} times" ) for node in self.neofs_env.storage_nodes: