Merge "Add ctl node as a target Related-Prod:PROD-36446 Change-Id: I1b51cb935aba82a389cbd71ac161607481c57d0c"
diff --git a/jobs/pipelines/run-test-scenarios.groovy b/jobs/pipelines/run-test-scenarios.groovy
index 31aff06..76d5cb2 100644
--- a/jobs/pipelines/run-test-scenarios.groovy
+++ b/jobs/pipelines/run-test-scenarios.groovy
@@ -44,10 +44,10 @@
if (env.RUN_TEST_OPTS) {
shared.swarm_run_pytest(steps, "${PARENT_NODE_NAME}", make_snapshot_stages)
} else {
- common.printMsg("RUN_TEST_OPTS is empty, skipping 'swarm-run-pytest' job", "green")
+ common.infoMsg("RUN_TEST_OPTS is empty, skipping 'swarm-run-pytest' job", "green")
}
} catch (e) {
- common.printMsg("Tests are failed: " + e.message, "purple")
+ common.infoMsg("Tests are failed: " + e.message, "purple")
currentBuild.result = 'FAILURE'
}
} // stage("Run tests")
@@ -60,14 +60,14 @@
stage("report results to testrail from jenkins master") {
if ("${env.REPORT_TO_TESTRAIL}" != "false") {
- common.printMsg("Running on: " + env.PARENT_NODE_NAME, "blue")
+ common.infoMsg("Running on: " + env.PARENT_NODE_NAME, "blue")
shared.verbose_sh("""\
[ -d /home/jenkins/venv_testrail_reporter ] || virtualenv --python=python3.7 /home/jenkins/venv_testrail_reporter""", true, false, true)
shared.run_cmd("""\
. /home/jenkins/venv_testrail_reporter/bin/activate; pip install git+https://github.com/dis-xcom/testrail_reporter -U""")
shared.swarm_testrail_report(steps, env.PARENT_NODE_NAME)
} else {
- common.printMsg("REPORT_TO_TESTRAIL is set to FALSE. Skipped this step ")
+ common.infoMsg("REPORT_TO_TESTRAIL is set to FALSE. Skipped this step ")
}
} // stage("report results to testrail from jenkins master")
stage("Store TestRail reports to job description") {
@@ -77,7 +77,7 @@
currentBuild.description += "${description}"
}
} else {
- common.printMsg("REPORT_TO_TESTRAIL is set to FALSE. Skipped this step ")
+ common.infoMsg("REPORT_TO_TESTRAIL is set to FALSE. Skipped this step ")
}
} // stage("Store TestRail reports to job description")
} // dir
diff --git a/tcp_tests/tests/system/test_backup_restore_galera.py b/tcp_tests/tests/system/test_backup_restore_galera.py
index 49f6234..573756a 100644
--- a/tcp_tests/tests/system/test_backup_restore_galera.py
+++ b/tcp_tests/tests/system/test_backup_restore_galera.py
@@ -77,21 +77,18 @@
Scenario:
1. Create flavor to be backuped
2. Run job galera_backup_database
- 3. Run tests with cvp-sanity job
- 4. Run tests with cvp-tempest job
- 5. Create flavor not to be restored
- 6. Run job galera_verify_restore
- 7. If jobs are passed then start tests with cvp-sanity job
- 8. Run tests with cvp-tempest job
+ 3. Create flavor not to be restored
+ 4. Run job galera_verify_restore
+
"""
dt = drivetrain_actions
- salt = salt_actions
show_step(1)
- cfg_node = self._get_cfg_fqn(salt)
+ ctl_node = underlay_actions.get_target_node_names(target='ctl')[0]
+ print(ctl_node)
fixture_flavor1 = 'test1'
fixture_flavor2 = 'test2'
- self.create_flavor(underlay_actions, fixture_flavor1, cfg_node)
+ self.create_flavor(underlay_actions, fixture_flavor1, ctl_node)
# ################## Run backup job #########################
show_step(2)
job_name = 'galera_backup_database'
@@ -104,45 +101,10 @@
assert job_result == 'SUCCESS', job_description
- # ######################## Run CPV ###########################
show_step(3)
- job_name = 'cvp-sanity'
- job_cvp_sanity_parameters = {
- 'EXTRA_PARAMS': '''
-
- envs:
- - skipped_packages='{},{},{},{},{},{}'
- - skipped_modules='xunitmerge,setuptools'
- - skipped_services='docker,containerd'
- - ntp_skipped_nodes=''
- - tests_set=-k "not {} and not {} and not {}"
- '''.format('python-setuptools', 'python-pkg-resources',
- 'xunitmerge', 'python-gnocchiclient',
- 'python-ujson', 'python-octaviaclient',
- 'test_ceph_status', 'test_prometheus_alert_count',
- 'test_uncommited_changes')
- }
- job_result, job_description = dt.start_job_on_jenkins(
- job_name=job_name,
- job_parameters=job_cvp_sanity_parameters)
-
- assert job_result == 'SUCCESS', job_description
-
- # ######################## Run Tempest ###########################
- show_step(4)
- job_name = 'cvp-tempest'
- job_parameters = {
- 'TEMPEST_ENDPOINT_TYPE': 'internalURL'
- }
- job_result, job_description = dt.start_job_on_jenkins(
- job_name=job_name,
- job_parameters=job_parameters)
-
- assert job_result == 'SUCCESS', job_description
- show_step(5)
- self.create_flavor(underlay_actions, fixture_flavor2, cfg_node)
+ self.create_flavor(underlay_actions, fixture_flavor2, ctl_node)
# ######################## Run Restore ###########################
- show_step(6)
+ show_step(4)
job_name = 'galera_verify_restore'
job_parameters = {
'RESTORE_TYPE': 'ONLY_RESTORE',
@@ -156,28 +118,8 @@
assert self.is_flavor_restored(underlay_actions,
fixture_flavor1,
- cfg_node)
+ ctl_node)
assert self.is_flavor_restored(underlay_actions,
fixture_flavor2,
- cfg_node) is False
- # ######################## Run CPV ###########################
- show_step(7)
-
- job_name = 'cvp-sanity'
- job_result, job_description = dt.start_job_on_jenkins(
- job_name=job_name,
- job_parameters=job_cvp_sanity_parameters)
-
- assert job_result == 'SUCCESS', job_description
- # ######################## Run Tempest ###########################
- show_step(8)
- job_name = 'cvp-tempest'
- job_parameters = {
- 'TEMPEST_ENDPOINT_TYPE': 'internalURL'
- }
- job_result, job_description = dt.start_job_on_jenkins(
- job_name=job_name,
- job_parameters=job_parameters)
-
- assert job_result == 'SUCCESS', job_description
- self.delete_flavor(underlay_actions, fixture_flavor1, cfg_node)
+ ctl_node) is False
+ self.delete_flavor(underlay_actions, fixture_flavor1, ctl_node)