Set requirement for existed cicd-nodes in drivetrain tests
Related-Task: #PROD-28514(PROD:28514)
Change-Id: I95268fae93cb1fe0eed5276468d0e8e1512c92d2
diff --git a/test_set/cvp-sanity/fixtures/base.py b/test_set/cvp-sanity/fixtures/base.py
index 0b83260..cb90bc5 100644
--- a/test_set/cvp-sanity/fixtures/base.py
+++ b/test_set/cvp-sanity/fixtures/base.py
@@ -122,6 +122,28 @@
pytest.contrail = str(versions.pop())[:1]
+@pytest.fixture(scope='session')
+def check_kdt(local_salt_client):
+ kdt_nodes_available = local_salt_client.cmd(
+ "I@gerrit:client and I@kubernetes:pool",
+ "test.ping",
+ expr_form='compound'
+ )
+ if not kdt_nodes_available:
+ pytest.skip("No 'kdt' nodes found. Skipping this test...")
+
+
+@pytest.fixture(scope='session')
+def check_cicd(local_salt_client):
+ cicd_nodes_available = local_salt_client.cmd(
+ "I@gerrit:client and I@docker:swarm",
+ "test.ping",
+ expr_form='compound'
+ )
+ if not cicd_nodes_available:
+ pytest.skip("No 'cid' nodes found. Skipping this test...")
+
+
@pytest.fixture(autouse=True, scope='session')
def print_node_version(local_salt_client):
"""