2023-10-03 12:18:29 +00:00
|
|
|
from frostfs_testlib.healthcheck.interfaces import Healthcheck
|
|
|
|
from frostfs_testlib.reporter import get_reporter
|
|
|
|
from frostfs_testlib.steps.node_management import storage_node_healthcheck
|
|
|
|
from frostfs_testlib.storage.cluster import ClusterNode
|
|
|
|
|
|
|
|
reporter = get_reporter()
|
|
|
|
|
|
|
|
|
|
|
|
class BasicHealthcheck(Healthcheck):
|
|
|
|
@reporter.step_deco("Perform healthcheck for {cluster_node}")
|
2023-10-05 13:42:28 +00:00
|
|
|
def perform(self, cluster_node: ClusterNode):
|
2023-10-03 12:18:29 +00:00
|
|
|
health_check = storage_node_healthcheck(cluster_node.storage_node)
|
|
|
|
if health_check.health_status != "READY" or health_check.network_status != "ONLINE":
|
|
|
|
raise AssertionError("Node {cluster_node} is not healthy")
|