Add fixture after test #65

Merged
d.zayakin merged 1 commit from d.zayakin/frostfs-testcases:fix-network-test into master 2023-07-13 06:20:11 +00:00

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.