Node argument made optional for epoch ticks #39

Merged
JuliaKovshova merged 1 commit from d.zayakin/frostfs-testcases:make-alive-node-optional into master 2023-05-10 11:05:40 +00:00

View file

@ -1,3 +1,5 @@
from typing import Optional
import allure import allure
import pytest import pytest
from frostfs_testlib.shell import Shell from frostfs_testlib.shell import Shell
@ -18,11 +20,11 @@ class ClusterTestBase:
yield yield
@allure.title("Tick {epochs_to_tick} epochs") @allure.title("Tick {epochs_to_tick} epochs")
def tick_epochs(self, epochs_to_tick: int, alive_node: StorageNode): def tick_epochs(self, epochs_to_tick: int, alive_node: Optional[StorageNode] = None):
for _ in range(epochs_to_tick): for _ in range(epochs_to_tick):
self.tick_epoch(alive_node) self.tick_epoch(alive_node)
def tick_epoch(self, alive_node: StorageNode): def tick_epoch(self, alive_node: Optional[StorageNode] = None):
epoch.tick_epoch(self.shell, self.cluster, alive_node=alive_node) epoch.tick_epoch(self.shell, self.cluster, alive_node=alive_node)
def wait_for_epochs_align(self): def wait_for_epochs_align(self):