|
| 1 | +Feature: CSI testing related feature |
| 2 | + |
| 3 | + |
| 4 | + # @case_id OCP-21804 |
| 5 | + @admin |
| 6 | + @destructive |
| 7 | + Scenario: Deploy a cinder csi driver and test |
| 8 | + Given I deploy "cinder" driver using csi |
| 9 | + And I register clean-up steps: |
| 10 | + """ |
| 11 | + I cleanup "cinder" csi driver |
| 12 | + """ |
| 13 | + And I create storage class for "cinder" csi driver |
| 14 | + And I checked "cinder" csi driver is running |
| 15 | + And I have a project |
| 16 | + When I create a dynamic pvc from "https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/storage/misc/pvc.json" replacing paths: |
| 17 | + | ["metadata"]["name"] | pvc-<%= project.name %> | |
| 18 | + | ["metadata"]["annotations"]["volume.beta.kubernetes.io/storage-class"] | cinder-csi | |
| 19 | + Then the step should succeed |
| 20 | + And the "pvc-<%= project.name %>" PVC becomes :bound |
| 21 | + When I run oc create over "https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/storage/misc/pod.yaml" replacing paths: |
| 22 | + | ["metadata"]["name"] | pod-<%= project.name %> | |
| 23 | + | ["spec"]["volumes"][0]["persistentVolumeClaim"]["claimName"] | pvc-<%= project.name %> | |
| 24 | + | ["spec"]["containers"][0]["volumeMounts"][0]["mountPath"] | /mnt/cinder | |
| 25 | + Then the step should succeed |
| 26 | + Given the pod named "pod-<%= project.name %>" becomes ready |
| 27 | + When I execute on the pod: |
| 28 | + | ls | -ld | /mnt/cinder/ | |
| 29 | + Then the step should succeed |
| 30 | + When I execute on the pod: |
| 31 | + | touch | /mnt/cinder/testfile | |
| 32 | + Then the step should succeed |
| 33 | + When I execute on the pod: |
| 34 | + | cp | /hello | /mnt/cinder/ | |
| 35 | + Then the step should succeed |
| 36 | + When I execute on the pod: |
| 37 | + | /mnt/cinder/hello | |
| 38 | + Then the step should succeed |
| 39 | + And the output should contain "Hello OpenShift Storage" |
0 commit comments