Skip to content

Commit 7adb482

Browse files
fix: cluster sanity does not need to execute when operator or cluster health is run (#1184) (#1186)
Co-authored-by: Debarati Basu-Nag <dbasunag@redhat.com>
1 parent 20a1ea8 commit 7adb482

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,12 @@ def cluster_sanity_scope_session(
653653
dsc_resource: DataScienceCluster,
654654
junitxml_plugin: Callable[[str, object], None],
655655
) -> None:
656+
# Skip cluster sanity check when running tests that have cluster_health or operator_health markers
657+
selected_markers = {mark.name for item in request.session.items for mark in item.iter_markers()}
658+
if {"cluster_health", "operator_health"} & selected_markers:
659+
LOGGER.info("Skipping cluster sanity check because selected tests include cluster/operator health")
660+
return
661+
656662
verify_cluster_sanity(
657663
request=request,
658664
nodes=nodes,

0 commit comments

Comments
 (0)