This section explains how to use the tungsten-pytest
test set to
verify your Tungsten Fabric (TF) deployment. The tungsten-pytest
test
set is part of the TF operator and allows for prompt verification of the
Kubernetes objects related to TF and basic verification of the TF services.
To verify the TF deployment using tungsten-pytest:
Enable the tf-test
controller in the TF Operator resource for the
Operator to start the pod with the test set:
spec:
controllers:
tf-test:
tungsten-pytest:
enabled: true
Wait until the tungsten-pytest
pod is ready.
To keep track of the tests execution and view the results, run:
kubectl -n tf logs -l app=tf-test
Optional. The test results are stored in the tf-test-tungsten-pytest
PVC. To obtain the results:
Deploy the pod with the mounted volume:
# Run pod and mount pvc to it
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
name: tf-test-results-pod
namespace: tf
spec:
volumes:
- name: tf-test-data-volume
persistentVolumeClaim:
claimName: tf-test-tungsten-pytest
containers:
- name: tempest-pvc-container
image: ubuntu
command: ['sh', '-c', 'sleep infinity']
volumeMounts:
- mountPath: "/tungsten-pytest/data"
name: tf-test-data-volume
EOF
Copy the results locally:
kubectl -n tf cp tf-test-results-pod:tungsten-pytest/data/results.xml results.xml
Remove the Tempest test results pod:
kubectl -n tf delete pod tf-test-results-pod
Disable the tf-test
controller:
kubectl -n tf patch tfoperator openstack-tf --type='json' -p='[{"op": "replace", "path": "/spec/controllers/tf-test/tungsten-pytest/enabled", "value": false}]'
Manually remove the pod with tests:
kubectl -n tf delete pod -l app=tf-test