diff --git a/pytest_tests/testsuites/conftest.py b/pytest_tests/testsuites/conftest.py index 3fd97ed..559778d 100644 --- a/pytest_tests/testsuites/conftest.py +++ b/pytest_tests/testsuites/conftest.py @@ -105,6 +105,19 @@ def require_multiple_hosts(hosting: Hosting): yield +@pytest.fixture(scope="session") +def require_multiple_interfaces(cluster: Cluster): + """ + We determine that there are the required number of interfaces for tests + + If there are no required interfaces, the tests will be skipped. + """ + interfaces = cluster.cluster_nodes[0].host.config.interfaces + if "internal1" not in interfaces or "data1" not in interfaces: + pytest.skip("This test requires multiple internal and data interfaces") + yield + + @pytest.fixture(scope="session") def max_object_size(cluster: Cluster, client_shell: Shell) -> int: storage_node = cluster.storage_nodes[0] diff --git a/pytest_tests/testsuites/failovers/test_failover_network.py b/pytest_tests/testsuites/failovers/test_failover_network.py index 7bd911f..5211796 100644 --- a/pytest_tests/testsuites/failovers/test_failover_network.py +++ b/pytest_tests/testsuites/failovers/test_failover_network.py @@ -336,7 +336,7 @@ class TestFailoverNetwork(ClusterTestBase): self.tick_epochs(1, alive_node=nodes_without_an_object[0].storage_node, wait_block=2) @pytest.mark.interfaces - @pytest.mark.baremetal + @pytest.mark.failover_baremetal @pytest.mark.parametrize( "block_interface, other_interface", [(Interfaces.DATA_O, Interfaces.DATA_1), (Interfaces.DATA_1, Interfaces.DATA_O)], @@ -344,6 +344,7 @@ class TestFailoverNetwork(ClusterTestBase): @allure.title("Down data interfaces to all nodes(interface={block_interface})") def test_down_data_interface( self, + require_multiple_interfaces, cluster_state_controller: ClusterStateController, default_wallet: str, simple_object_size: ObjectSize, @@ -394,11 +395,12 @@ class TestFailoverNetwork(ClusterTestBase): self.tick_epochs(1, alive_node=cluster_nodes[0].storage_node, wait_block=2) @pytest.mark.interfaces - @pytest.mark.baremetal + @pytest.mark.failover_baremetal @pytest.mark.parametrize("interface", [Interfaces.INTERNAL_0, Interfaces.INTERNAL_1]) @allure.title("Down internal interfaces to all nodes(interface={interface})") def test_down_internal_interface( self, + require_multiple_interfaces, cluster_state_controller: ClusterStateController, default_wallet: str, simple_object_size: ObjectSize,