Changed fixture restore network

Signed-off-by: Dmitriy Zayakin <d.zayakin@yadro.com>
This commit is contained in:
Dmitriy Zayakin 2023-07-12 12:05:36 +03:00
parent dc13252ff2
commit f4a267fe81

View file

@ -28,10 +28,10 @@ blocked_nodes: list[StorageNode] = []
@pytest.mark.failover_network @pytest.mark.failover_network
class TestFailoverNetwork(ClusterTestBase): class TestFailoverNetwork(ClusterTestBase):
@pytest.fixture(autouse=True) @pytest.fixture(autouse=True)
@allure.step("Restore network") @allure.title("Restore network")
def restore_network(self): def restore_network(self):
yield yield
with allure.step(f"Count blocked nodes {len(blocked_nodes)}"):
not_empty = len(blocked_nodes) != 0 not_empty = len(blocked_nodes) != 0
for node in list(blocked_nodes): for node in list(blocked_nodes):
with allure.step(f"Restore network at host for {node.label}"): with allure.step(f"Restore network at host for {node.label}"):
@ -42,7 +42,10 @@ class TestFailoverNetwork(ClusterTestBase):
@allure.title("Block Storage node traffic") @allure.title("Block Storage node traffic")
def test_block_storage_node_traffic( def test_block_storage_node_traffic(
self, default_wallet: str, require_multiple_hosts, simple_object_size: int self,
default_wallet: str,
require_multiple_hosts,
simple_object_size: int,
): ):
""" """
Block storage nodes traffic using iptables and wait for replication for objects. Block storage nodes traffic using iptables and wait for replication for objects.