Skip to content

Commit 4c9f318

Browse files
committed
test: add nfs e2e test
1 parent bcaecd2 commit 4c9f318

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed

test/e2e/dynamic_provisioning_test.go

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ var _ = ginkgo.Describe("[blob-csi-e2e] Dynamic Provisioning", func() {
5656
})
5757

5858
testDriver = driver.InitBlobCSIDriver()
59-
ginkgo.It("should create a volume on demand", func() {
59+
ginkgo.It("should create a volume on demand with mount options", func() {
6060
pods := []testsuites.PodDetails{
6161
{
6262
Cmd: "echo 'hello world' > /mnt/test-1/data && grep 'hello world' /mnt/test-1/data",
@@ -277,6 +277,35 @@ var _ = ginkgo.Describe("[blob-csi-e2e] Dynamic Provisioning", func() {
277277
test.Run(cs, ns)
278278
})
279279

280+
ginkgo.It("should create a NFSv3 volume on demand with mount options [nfs]", func() {
281+
pods := []testsuites.PodDetails{
282+
{
283+
Cmd: "echo 'hello world' > /mnt/test-1/data && grep 'hello world' /mnt/test-1/data",
284+
Volumes: []testsuites.VolumeDetails{
285+
{
286+
ClaimSize: "10Gi",
287+
MountOptions: []string{
288+
"nconnect=16",
289+
},
290+
VolumeMount: testsuites.VolumeMountDetails{
291+
NameGenerate: "test-volume-",
292+
MountPathGenerate: "/mnt/test-",
293+
},
294+
},
295+
},
296+
},
297+
}
298+
test := testsuites.DynamicallyProvisionedCmdVolumeTest{
299+
CSIDriver: testDriver,
300+
Pods: pods,
301+
StorageClassParameters: map[string]string{
302+
"skuName": "Premium_LRS",
303+
"protocol": "nfs",
304+
},
305+
}
306+
test.Run(cs, ns)
307+
})
308+
280309
ginkgo.It("should create a volume on demand (Bring Your Own Key)", func() {
281310
// get storage account secret name
282311
err := os.Chdir("../..")
@@ -325,7 +354,7 @@ var _ = ginkgo.Describe("[blob-csi-e2e] Dynamic Provisioning", func() {
325354
test.Run(cs, ns)
326355
})
327356

328-
ginkgo.It("should create a volume on demand and resize it [kubernetes.io/blob-csi] [blob.csi.azure.com]", func() {
357+
ginkgo.It("should create a volume on demand and resize it [blob.csi.azure.com]", func() {
329358
pods := []testsuites.PodDetails{
330359
{
331360
Cmd: "echo 'hello world' > /mnt/test-1/data && grep 'hello world' /mnt/test-1/data",

test/utils/blob_log.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ kubectl get pods -n default -o wide
2828
echo "======================================================================================"
2929

3030
echo "print out all $NS namespace pods status ..."
31-
kubectl get pods -n${NS}
31+
kubectl get pods -n${NS} -o wide
3232
echo "======================================================================================"
3333

3434
echo "print out csi-blob-controller logs ..."

0 commit comments

Comments
 (0)