Skip to content

Commit 00a537f

Browse files
weherdhakostadinov
authored andcommitted
Make csi driver deployment as a case so that can be run as CVP (#56)
1 parent 99eb657 commit 00a537f

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

features/step_definitions/cluster_configuration/csi.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
ensure_admin_tagged
8686
ensure_destructive_tagged
8787

88-
serviceaccount = "#{driver}-csi"
88+
serviceaccount = "#{driver}-csi"
8989

9090
# delete project
9191
step %Q/admin ensures "#{namespace}" project is deleted/

features/storage/csi.feature

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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

Comments
 (0)