@@ -23,6 +23,7 @@ import (
23
23
"os"
24
24
"os/exec"
25
25
"strings"
26
+ "time"
26
27
27
28
"sigs.k8s.io/blob-csi-driver/test/e2e/driver"
28
29
"sigs.k8s.io/blob-csi-driver/test/e2e/testsuites"
@@ -121,6 +122,39 @@ var _ = ginkgo.Describe("[blob-csi-e2e] Dynamic Provisioning", func() {
121
122
test .Run (cs , ns )
122
123
})
123
124
125
+ ginkgo .It ("should create a volume on demand with specified secretName" , func () {
126
+ pods := []testsuites.PodDetails {
127
+ {
128
+ Cmd : "echo 'hello world' > /mnt/test-1/data && grep 'hello world' /mnt/test-1/data" ,
129
+ Volumes : []testsuites.VolumeDetails {
130
+ {
131
+ ClaimSize : "10Gi" ,
132
+ MountOptions : []string {
133
+ "-o allow_other" ,
134
+ "--file-cache-timeout-in-seconds=120" ,
135
+ "--cancel-list-on-mount-seconds=0" ,
136
+ },
137
+ VolumeMount : testsuites.VolumeMountDetails {
138
+ NameGenerate : "test-volume-" ,
139
+ MountPathGenerate : "/mnt/test-" ,
140
+ },
141
+ },
142
+ },
143
+ },
144
+ }
145
+ scParameters := map [string ]string {
146
+ "skuName" : "Standard_LRS" ,
147
+ "secretNamespace" : "kube-system" ,
148
+ }
149
+ scParameters ["secretName" ] = fmt .Sprintf ("secret-%d" , time .Now ().Unix ())
150
+ test := testsuites.DynamicallyProvisionedCmdVolumeTest {
151
+ CSIDriver : testDriver ,
152
+ Pods : pods ,
153
+ StorageClassParameters : scParameters ,
154
+ }
155
+ test .Run (cs , ns )
156
+ })
157
+
124
158
ginkgo .It ("should create a deployment object, write and read to it, delete the pod and write and read to it again" , func () {
125
159
pod := testsuites.PodDetails {
126
160
Cmd : "echo 'hello world' >> /mnt/test-1/data && while true; do sleep 1; done" ,
0 commit comments