Skip to content

Commit 5182b8b

Browse files
committed
add e2e test
1 parent 0f3205a commit 5182b8b

File tree

1 file changed

+102
-0
lines changed

1 file changed

+102
-0
lines changed

test/e2e/dynamic_provisioning_test.go

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,4 +606,106 @@ var _ = ginkgo.Describe("[blob-csi-e2e] Dynamic Provisioning", func() {
606606
}
607607
test.Run(cs, ns)
608608
})
609+
610+
ginkgo.It("should create a private endpoint volume on demand", func() {
611+
if isAzureStackCloud {
612+
ginkgo.Skip("test case is not available for Azure Stack")
613+
}
614+
pods := []testsuites.PodDetails{
615+
{
616+
Cmd: "echo 'hello world' > /mnt/test-1/data && grep 'hello world' /mnt/test-1/data",
617+
Volumes: []testsuites.VolumeDetails{
618+
{
619+
ClaimSize: "10Gi",
620+
MountOptions: []string{
621+
"-o allow_other",
622+
"--file-cache-timeout-in-seconds=120",
623+
"--cancel-list-on-mount-seconds=0",
624+
},
625+
VolumeMount: testsuites.VolumeMountDetails{
626+
NameGenerate: "test-volume-",
627+
MountPathGenerate: "/mnt/test-",
628+
},
629+
},
630+
},
631+
},
632+
}
633+
test := testsuites.DynamicallyProvisionedCmdVolumeTest{
634+
CSIDriver: testDriver,
635+
Pods: pods,
636+
StorageClassParameters: map[string]string{
637+
"skuName": "Standard_LRS",
638+
"networkEndpointType": "privateEndpoint",
639+
},
640+
}
641+
test.Run(cs, ns)
642+
})
643+
644+
ginkgo.It("should create a private endpoint volume on demand with protocol [fuse2]", func() {
645+
if isAzureStackCloud {
646+
ginkgo.Skip("test case is not available for Azure Stack")
647+
}
648+
pods := []testsuites.PodDetails{
649+
{
650+
Cmd: "echo 'hello world' > /mnt/test-1/data && grep 'hello world' /mnt/test-1/data",
651+
Volumes: []testsuites.VolumeDetails{
652+
{
653+
ClaimSize: "10Gi",
654+
MountOptions: []string{
655+
"-o allow_other",
656+
"--virtual-directory=true", // blobfuse2 mount options
657+
},
658+
VolumeMount: testsuites.VolumeMountDetails{
659+
NameGenerate: "test-volume-",
660+
MountPathGenerate: "/mnt/test-",
661+
},
662+
},
663+
},
664+
},
665+
}
666+
test := testsuites.DynamicallyProvisionedCmdVolumeTest{
667+
CSIDriver: testDriver,
668+
Pods: pods,
669+
StorageClassParameters: map[string]string{
670+
"skuName": "Standard_LRS",
671+
"protocol": "fuse2",
672+
"networkEndpointType": "privateEndpoint",
673+
},
674+
}
675+
test.Run(cs, ns)
676+
})
677+
678+
ginkgo.It("should create a private endpoint volume on demand with protocol [nfs]", func() {
679+
if isAzureStackCloud {
680+
ginkgo.Skip("test case is not available for Azure Stack")
681+
}
682+
pods := []testsuites.PodDetails{
683+
{
684+
Cmd: "echo 'hello world' > /mnt/test-1/data && grep 'hello world' /mnt/test-1/data",
685+
Volumes: []testsuites.VolumeDetails{
686+
{
687+
ClaimSize: "10Gi",
688+
MountOptions: []string{
689+
"nconnect=8",
690+
},
691+
VolumeMount: testsuites.VolumeMountDetails{
692+
NameGenerate: "test-volume-",
693+
MountPathGenerate: "/mnt/test-",
694+
},
695+
},
696+
},
697+
},
698+
}
699+
test := testsuites.DynamicallyProvisionedCmdVolumeTest{
700+
CSIDriver: testDriver,
701+
Pods: pods,
702+
StorageClassParameters: map[string]string{
703+
"skuName": "Premium_LRS",
704+
"protocol": "nfs",
705+
"mountPermissions": "0755",
706+
"networkEndpointType": "privateEndpoint",
707+
},
708+
}
709+
test.Run(cs, ns)
710+
})
609711
})

0 commit comments

Comments
 (0)