Fix cvp-sanity tests_settings
- Use the actual MCP version for 'drivetrain_version' parameter
instead of hardcoded 'proposed'
- Use 'ntp_skipped_nodes' to skip the cfg01 node with MaaS
Closes-Bugs: PROD-21993, PROD-27182, PROD-27980
Change-Id: Ib3f5abe305d810c6794a5941c8c8be0a0b11114c
diff --git a/tcp_tests/settings.py b/tcp_tests/settings.py
index 166b492..347e8e6 100644
--- a/tcp_tests/settings.py
+++ b/tcp_tests/settings.py
@@ -85,6 +85,10 @@
TEMPEST_TARGET = os.environ.get('TEMPEST_TARGET', 'gtw01')
SALT_VERSION = os.environ.get('SALT_VERSION', '2017.7')
+# REPOSITORY_SUITE is always defined in swarm-run-pytest from MCP_VERSION
+REPOSITORY_SUITE = os.environ.get('REPOSITORY_SUITE', 'proposed')
+MCP_VERSION = os.environ.get('MCP_VERSION', REPOSITORY_SUITE)
+
SL_TEST_REPO = os.environ.get('SL_TEST_REPO',
'https://github.com/Mirantis/stacklight-pytest')
SL_TEST_COMMIT = os.environ.get('SL_TEST_COMMIT', 'master')
diff --git a/tcp_tests/tests/system/test_cvp_pipelines.py b/tcp_tests/tests/system/test_cvp_pipelines.py
index cb6a5bb..acad827 100644
--- a/tcp_tests/tests/system/test_cvp_pipelines.py
+++ b/tcp_tests/tests/system/test_cvp_pipelines.py
@@ -121,10 +121,16 @@
jenkins_start_timeout = 60
jenkins_build_timeout = 1800
+ maas_minion_id = salt.get_single_pillar(
+ tgt='I@maas:cluster:enabled:True or I@maas:region:enabled:True',
+ pillar="__reclass__:nodename")
+
job_name = 'cvp-sanity'
job_parameters = {
'TEST_SET': '/var/lib/cvp-sanity/cvp_checks/tests/',
- 'TESTS_SETTINGS': 'drivetrain_version=proposed',
+ 'TESTS_SETTINGS': (
+ 'drivetrain_version={0};ntp_skipped_nodes={1}'
+ .format(settings.MCP_VERSION, maas_minion_id)),
}
show_step(2)
diff --git a/tcp_tests/tests/system/test_offline.py b/tcp_tests/tests/system/test_offline.py
index 4d73e84..62b1c9f 100644
--- a/tcp_tests/tests/system/test_offline.py
+++ b/tcp_tests/tests/system/test_offline.py
@@ -263,8 +263,14 @@
salt_deployed.update_ssh_data_from_minions()
show_step(4)
+ maas_minion_id = salt_deployed.get_single_pillar(
+ tgt='I@maas:cluster or I@maas:region',
+ pillar="__reclass__:nodename")
+
params = jenkins.make_defults_params('cvp-sanity')
- params['TESTS_SETTINGS'] = 'drivetrain_version=proposed'
+ params['TESTS_SETTINGS'] = (
+ 'drivetrain_version={0};ntp_skipped_nodes={1}'
+ .format(settings.MCP_VERSION, maas_minion_id))
build = jenkins.run_build('cvp-sanity', params)
LOG.info("Take a look test progress here - %s. Build #%s",
"http://172.16.44.33:8081/job/cvp-sanity/", build[1])