Run Tempest tests¶
The OpenStack Integration Test Suite (Tempest), is a set of integration tests to be run against a live OpenStack cluster. This section instructs you on how to verify the workability of your OpenStack deployment using Tempest.
To verify an OpenStack deployment using Tempest:
Configure the Tempest run parameters using the following structure in the OsDpl CR.
Note
To perform the smoke testing of your deployment, no additional configuration is required.
For example, with the following configuration in
tempest.conf
, the system performs the full Tempest testing:spec: services: tempest: tempest: values: conf: script: | tempest run --config-file /etc/tempest/tempest.conf --concurrency 4 --blacklist-file /etc/tempest/test-blacklist --regex test
The following example structure from the OsDpl CR will set
image:build_timeout
to600
intempest.conf
:spec: services: tempest: tempest: values: conf: tempest: image: build_timeout: 600
Run Tempest. The OpenStack Tempest is deployed like other OpenStack services in a dedicated
openstack-tempest
Helm release by addingtempest
tospec:features:services
in the OSDPL resource.spec: features: services: - tempest
Wait until Tempest is ready. The Tempest tests are launched by the
openstack-tempest-run-tests
job. To keep track of the tests execution, run:kubectl -n openstack logs -l application=tempest,component=run-tests
Get the Tempest results. The Tempest results can be stored in a
pvc-tempest
PersistentVolumeClaim (PVC). To get them from a PVC, use:# Run pod and mount pvc to it cat <<EOF | kubectl apply -f - apiVersion: v1 kind: Pod metadata: name: tempest-test-results-pod namespace: openstack spec: nodeSelector: openstack-control-plane: enabled volumes: - name: tempest-pvc-storage persistentVolumeClaim: claimName: pvc-tempest containers: - name: tempest-pvc-container image: ubuntu command: ['sh', '-c', 'sleep infinity'] volumeMounts: - mountPath: "/var/lib/tempest/data" name: tempest-pvc-storage EOF
If required, copy the results locally:
kubectl -n openstack cp tempest-test-results-pod:/var/lib/tempest/data/report_file.xml .
Remove the Tempest test results pod:
kubectl -n openstack delete pod tempest-test-results-pod
To rerun Tempest:
Remove Tempest from the list of enabled services.
Wait until Tempest jobs are removed.
Add Tempest back to the list of the enabled services.