Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ markers =
fuzzer: Mark tests that use fuzzing and are probably going to generate unanticipated failures.
ocp_interop: Interop testing with Openshift.
downstream_only: Tests that are specific to downstream
cluster_health: Tests that verifies that cluster is healthy to begin testing

# Model server
modelmesh: Mark tests which are model mesh tests
Expand Down
Empty file.
23 changes: 23 additions & 0 deletions tests/cluster_health/test_cluster_health.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import pytest

from ocp_resources.data_science_cluster import DataScienceCluster
from ocp_resources.dsc_initialization import DSCInitialization
from ocp_resources.node import Node
from ocp_utilities.infra import assert_nodes_in_healthy_condition, assert_nodes_schedulable
from utilities.infra import wait_for_dsci_status_ready, wait_for_dsc_status_ready
Comment thread
dbasunag marked this conversation as resolved.


@pytest.mark.cluster_health
def test_cluster_node_healthy(nodes: list[Node]):
assert_nodes_in_healthy_condition(nodes=nodes, healthy_node_condition_type={"KubeletReady": "True"})
assert_nodes_schedulable(nodes=nodes)
Comment thread
dbasunag marked this conversation as resolved.


@pytest.mark.cluster_health
def test_data_science_cluster_initialization_healthy(dsci_resource: DSCInitialization):
wait_for_dsci_status_ready(dsci_resource=dsci_resource)


@pytest.mark.cluster_health
def test_data_science_cluster_healthy(dsc_resource: DataScienceCluster):
wait_for_dsc_status_ready(dsc_resource=dsc_resource)