Newer documentation is now live.You are currently reading an older version.

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:

  1. If a previous run is still enabled (spec.features.tfTest.enabled is true), disable it first and wait until the tf-test-tungsten-pytest Pod terminates. The operator does not start a new test run while the previous one is enabled.

  2. Enable tfTest in the TFOperator custom resource for the operator to start the Pod with the test set. The tungsten-pytest run is disabled by default:

    spec:
      features:
        tfTest:
          enabled: true
    
  3. Wait until the tf-test-tungsten-pytest Pod reaches the Running, Succeeded, or Failed state.

    To keep track of the tests execution and view the results, run:

    kubectl -n tf logs -l app=tf-test
    
  4. Optional. The test results are stored in the tf-test-tungsten-pytest PVC. Copy the results before you disable tfTest:

    1. 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
      
    2. Copy the results locally:

      kubectl -n tf cp tf-test-results-pod:tungsten-pytest/data/results.xml results.xml
      
    3. Remove the test results Pod:

      kubectl -n tf delete pod tf-test-results-pod
      
  5. Disable tfTest. The operator removes the tf-test-tungsten-pytest Pod:

    kubectl -n tf patch tfoperator.tf.mirantis.com <TFOperator CR name> --type='json' -p='[{"op": "replace", "path": "/spec/features/tfTest/enabled", "value": false}]'