Changed fixture restore network

Signed-off-by: Dmitriy Zayakin <d.zayakin@yadro.com>
update-check-policy-for-037
Dmitriy Zayakin 2023-07-12 12:05:36 +03:00
parent dc13252ff2
commit f4a267fe81
1 changed files with 7 additions and 4 deletions

View File

@ -28,11 +28,11 @@ blocked_nodes: list[StorageNode] = []
@pytest.mark.failover_network
class TestFailoverNetwork(ClusterTestBase):
@pytest.fixture(autouse=True)
@allure.step("Restore network")
@allure.title("Restore network")
def restore_network(self):
yield
not_empty = len(blocked_nodes) != 0
with allure.step(f"Count blocked nodes {len(blocked_nodes)}"):
not_empty = len(blocked_nodes) != 0
for node in list(blocked_nodes):
with allure.step(f"Restore network at host for {node.label}"):
IpTablesHelper.restore_input_traffic_to_port(node.host.get_shell(), PORTS_TO_BLOCK)
@ -42,7 +42,10 @@ class TestFailoverNetwork(ClusterTestBase):
@allure.title("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.