34.8. 运行 CSI 测试
在测试客户端中,将 kubeconfig.yaml
和 manifest.yaml
文件放在当前工作目录中,并运行以下命令:
$ 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”
如果您在最新的 OpenShift 版本上执行测试,请确保将正确的标签添加到容器镜像名称:registry.redhat.io/openshift4/ose-tests:<tag>
。如需可用标签列表,请参阅 OpenShift End-to-End Tests 存储库 页面。
验证步骤
命令的输出包括有关 CSI 功能的测试以及 OpenShift 中的容器原生虚拟化(CNV)的测试概述。以下是输出示例:
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
详细结果将放置在
结果
子目录中。如果要查看为 CSI 认证运行的测试列表,请运行以下命令:
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
注意
为每个支持的存储协议执行单独的测试。