Run the CSI function test

Run the Container Storage Interface (CSI) function test on a test client to complete the core compliance tier for your storage driver.

Procedure

  1. On the test client, place the kubeconfig.yaml and manifest.yaml files in the current working directory and run the following command:
    • For OpenShift v4.16 and later:

      $ mkdir -p test-results; cd test-results
      $ VERSION=$(oc get clusterversion -o 'jsonpath={.items[0].status.desired.version}' | cut -d. -f1,2)
      $ podman run -v "$(pwd):/data:z" -w /data --rm -it registry.redhat.io/openshift4/ose-tests-rhel9:${VERSION} sh -c "KUBECONFIG=/data/kubeconfig.yaml TEST_CSI_DRIVER_FILES=/data/manifest.yaml /usr/bin/openshift-tests run openshift/csi -o /data/results.txt"
    • For OpenShift v4.15 and earlier:

      $ mkdir -p test-results; cd test-results
      $ VERSION=$(oc get clusterversion -o 'jsonpath={.items[0].status.desired.version}' | cut -d. -f1,2)
      $ podman run -v "$(pwd):/data:z" -w /data --rm -it registry.redhat.io/openshift4/ose-tests:${VERSION} sh -c "KUBECONFIG=/data/kubeconfig.yaml TEST_CSI_DRIVER_FILES=/data/manifest.yaml /usr/bin/openshift-tests run openshift/csi -o /data/results.txt"

    The command uses the test suite that corresponds to the exact version of the Red Hat OpenShift cluster, for example, 4.x.

  2. Optional: To see a list of the tests that are run for CSI certification, run the following command:
    • For OpenShift v4.16 and later:

      $ podman run -v `pwd`:/data:z --rm -it registry.redhat.io/openshift4/ose-tests-rhel9 sh -c "KUBECONFIG=/data/kubeconfig.yaml TEST_CSI_DRIVER_FILES=/data/manifest.yaml /usr/bin/openshift-tests run --dry-run openshift/csi"
    • For OpenShift v4.15 and earlier:

      $ podman run -v `pwd`:/data:z --rm -it registry.redhat.io/openshift4/ose-tests sh -c "KUBECONFIG=/data/kubeconfig.yaml TEST_CSI_DRIVER_FILES=/data/manifest.yaml /usr/bin/openshift-tests run --dry-run openshift/csi"
    Note

    Execute separate tests for each supported storage protocol. On OpenShift 4.23 and OpenShift 5.0, review the dry-run list to confirm that optional tests such as Changed Block Tracking and volume group snapshots are included when you declare the corresponding capabilities in manifest.yaml.

  3. If your CSI component supports multiple architectures or protocols within the same certification, repeat the test run for each supported architecture and protocol.

    Each combination must be tested separately, using a dedicated environment if required.

Results

Saving the CSI test results

Make sure to have the following ready before submitting your test results:

  • Contents of the results directory
  • manifest.yaml file
  • Output of the following commands:

    $ oc get clusterversion -o yaml

    and

    $ podman image list registry.redhat.io/openshift4/ose-tests