Running the CSI Tests
On the test client, place the kubeconfig.yaml and manifest.yaml files in the current working directory, and run the following command:
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 openshift/csi --junit-dir /data/results"
If tests are executed on a version of OpenShift older than the latest release, make sure to add the right tag to the container image name: registry.redhat.io/openshift4/ose-tests:<tag> . See the ose-tests repository page for a list of available tags.
The output of the command will include a summary of the tests for the CSI capabilities and for OpenShift Virtualization (CNV). Here is a sample:
Storage Capabilities (guaranteed only on full CSI test suite with 0 fails)
==========================================================================
Driver short name: ceph-test
Driver name: test.rbd.csi.ceph.com
Storage class: ceph-rbd-sc.yaml
Supported OpenShift / CSI features:
Persistent volumes: true
Raw block mode: true
FSGroup: true
Executable files on a volume: true
Volume snapshots: true
Volume cloning: true
Use volume from multiple pods on a node:true
ReadWriteMany access mode: true
Volume expansion for controller: true
Volume expansion for node: true
Volume limits: true
Volume can run on single node: true
Topology: true
Supported CNV features:
Raw block VM disks: true
Live migration: true
VM snapshots: true
Storage-assisted cloning: true
Detailed results will be placed in the results subdirectory.
If you just want to see a list of the tests that would be executed, run the following command: 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 that separate tests must be executed for each storage protocol supported.
Copy link