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 |
TESTS_SETTINGS Removed since 2019.2.4 update |
|
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:
Obtain the LDAP server and port from the
_param:haproxy_openldap_bind_port
and
_param:haproxy_openldap_bind_host
pillars.
Obtain the LDAP admin password from the
_param:openldap_admin_password
pillar.
Using the admin user name from the openldap:client:server:auth:user
pillar and password from the previous step, connect to the LDAP server.
Create a test user DT_test_user
.
Add the created test user to the admins
group.
Using the test user credentials, try obtaining the information about the
cvp-sanity
job.
Using the test user credentials, try connecting to the Gerrit server and check the list of patches created by this user.
Delete the user from the 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:
Obtain the Gerrit server and port from the
_param:haproxy_gerrit_bind_port
and
_param:haproxy_gerrit_bind_host
pillars.
Obtain the Gerrit admin password from the
_param:openldap_admin_password
pillar.
Connect to Gerrit using the credentials from the previous steps.
Add a new test-dt-<current_date>
project.
Create a new file and send it on review.
As an admin user, add Code-Review +2
to the patch and merge it.
Delete the test project.
Run the test_drivetrain_services_replicas
job:
Obtain the list of Docker services from the cid
node.
Compare the number of expected and actual number of replicas.
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.