This section instructs you on how to perform the DriveTrain sanity testing of your deployment using the CPV - Sanity checks Jenkins pipeline. The sanity checks for DriveTrain include testing of the Gerrit, Jenkins, and OpenLDAP functionality, as well as the DriveTrain services replicas, components and versions, and the Jenkins job branch.
To perform the DriveTrain sanity testing:
Perform the steps 1-4 as described in Execute the CVP - Sanity checks pipeline.
Using the step 5 of the same procedure, specify the IMAGE, SALT_MASTER_CREDENTIALS, SALT_MASTER_URL parameters.
Configure the following parameters as required:
Parameter | Description |
---|---|
TESTS_SET Removed since 2019.2.4 update | Specify cvp-sanity/cvp_checks/tests/test_drivetrain.py to perform
only the DriveTrain sanity testing. |
TESTS_SETTINGS Removed since 2019.2.4 update | drivetrain_version=<your_mcp_version> |
EXTRA_PARAMS Added since 2019.2.4 | Specify envs:
- tests_set=tests/test_drivetrain.py
Added since 2019.2.7 You can override the configuration values
using the override_config:
skipped_nodes:
- log02
- apt03
|
Perform the remaining steps of the Execute the CVP - Sanity checks pipeline procedure.
The CPV - Sanity checks pipeline workflow for DriveTrain:
Run the test_drivetrain_openldap
job:
_param:haproxy_openldap_bind_port
and
_param:haproxy_openldap_bind_host
pillars._param:openldap_admin_password
pillar.openldap:client:server:auth:user
pillar and password from the previous step, connect to the LDAP server.DT_test_user
.admins
group.cvp-sanity
job.admins
group and from the LDAP server.Run the test_drivetrain_jenkins_job
job:
Obtain the Jenkins server and port from the
_param:haproxy_jenkins_bind_port
and
_param:haproxy_jenkins_bind_host
pillars.
Obtain the Jenkins admin password from the
_param:openldap_admin_password
pillar.
Connect to Jenkins using the credentials from the previous steps.
Execute <jenkins_test_job>
on the cid
node.
Note
The pipeline checks whether a DT-test-job
exists and if it
does not exist - creates a new empty DT-test-job
job. You can
specify another job using the jenkins_test_job
option in the
TESTS_SETTINGS parameter.
Wait 180 seconds for the SUCCESS
status of the job.
Run the test_drivetrain_gerrit
job:
_param:haproxy_gerrit_bind_port
and
_param:haproxy_gerrit_bind_host
pillars._param:openldap_admin_password
pillar.test-dt-<current_date>
project.Code-Review +2
to the patch and merge it.Run the test_drivetrain_services_replicas
job:
cid
node.Run the test_drivetrain_components_and_versions
job:
Obtain the list of Docker services from the cid
node.
Compare the list of expected and actual list of the services.
Compare the version of the service with the drivetrain_version
version.
Note
Prior to the 2019.2.4 update The test will
be skipped if drivetrain_version
was not defined in the
TESTS_SETTINGS parameter.
Run the test_jenkins_jobs_branch
job:
Obtain the list of all jobs from Jenkins.
Compare the versions of the jobs with the drivetrain_version
version.
Note
Prior to the 2019.2.4 update The test will
be skipped if drivetrain_version
was not
defined in the TESTS_SETTINGS parameter.
In MCP Build ID 2019.2.0, this test will fail due to an issue
with all Jenkins jobs having the release/2019.2.0
version
instead of 2019.2.0
. This issue has been fixed since the
2019.2.2 maintenance update.
The master
version for the deploy-update-salt
job is an
expected behavior.