Verify the Tungsten Fabric deployment
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:
If a previous run is still enabled (
spec.features.tfTest.enabledistrue), disable it first and wait until thetf-test-tungsten-pytestPod terminates. The operator does not start a new test run while the previous one is enabled.Enable
tfTestin theTFOperatorcustom resource for the operator to start the Pod with the test set. Thetungsten-pytestrun is disabled by default:spec: features: tfTest: enabled: true
Wait until the
tf-test-tungsten-pytestPod reaches theRunning,Succeeded, orFailedstate.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-pytestPVC. Copy the results before you disabletfTest: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 test results Pod:
kubectl -n tf delete pod tf-test-results-pod
Disable
tfTest. The operator removes thetf-test-tungsten-pytestPod:kubectl -n tf patch tfoperator.tf.mirantis.com <TFOperator CR name> --type='json' -p='[{"op": "replace", "path": "/spec/features/tfTest/enabled", "value": false}]'