@@ -21,47 +21,70 @@ import (
21
21
v12 "k8s.io/apimachinery/pkg/apis/meta/v1"
22
22
)
23
23
24
- var _ = Describe ("Basic FSS test" , func () {
24
+ var _ = Describe ("Basic Static FSS test" , func () {
25
25
f := framework .NewDefaultFramework ("fss-basic" )
26
- Context ("[cloudprovider][storage][csi][fss]" , func () {
26
+ Context ("[cloudprovider][storage][csi][fss][static] " , func () {
27
27
It ("Create PVC and POD for CSI-FSS" , func () {
28
28
pvcJig := framework .NewPVCTestJig (f .ClientSet , "csi-fss-e2e-test" )
29
- pv := pvcJig .CreatePVorFailFSS (f .Namespace .Name , setupF .VolumeHandle , "false" )
29
+ pv := pvcJig .CreatePVorFailFSS (f .Namespace .Name , setupF .VolumeHandle , "false" , [] string {} )
30
30
pvc := pvcJig .CreateAndAwaitPVCOrFailFSS (f .Namespace .Name , pv .Name , "50Gi" , nil )
31
31
f .VolumeIds = append (f .VolumeIds , pvc .Spec .VolumeName )
32
- pvcJig .CheckSinglePodReadWrite (f .Namespace .Name , pvc .Name , false )
32
+ pvcJig .CheckSinglePodReadWrite (f .Namespace .Name , pvc .Name , false , [] string {} )
33
33
})
34
34
})
35
35
})
36
36
37
- var _ = Describe ("FSS in-transit encryption test" , func () {
37
+ var _ = Describe ("FSS Static in-transit encryption test" , func () {
38
38
f := framework .NewDefaultFramework ("fss-basic" )
39
- Context ("[cloudprovider][storage][csi][fss]" , func () {
39
+ Context ("[cloudprovider][storage][csi][fss][static] " , func () {
40
40
It ("Create PVC and POD for FSS in-transit encryption" , func () {
41
41
if setupF .Architecture == "AMD" {
42
42
checkNodeAvailability (f )
43
- TestEncryptionType (f )
43
+ TestEncryptionType (f , [] string {} )
44
44
} else {
45
45
framework .Logf ("CSI-FSS Intransit Encryption is not supported on ARM architecture" )
46
46
}
47
47
})
48
48
})
49
49
})
50
50
51
- func TestEncryptionType (f * framework.CloudProviderFramework ) {
51
+ var _ = Describe ("Mount Options Static FSS test" , func () {
52
+ f := framework .NewDefaultFramework ("fss-mnt-opt" )
53
+ Context ("[cloudprovider][storage][csi][fss][static]" , func () {
54
+ It ("Create PV PVC and POD for CSI-FSS with mount options" , func () {
55
+ pvcJig := framework .NewPVCTestJig (f .ClientSet , "csi-fss-e2e-test" )
56
+ mountOptions := []string {"sync" , "hard" , "noac" , "nolock" }
57
+ pv := pvcJig .CreatePVorFailFSS (f .Namespace .Name , setupF .VolumeHandle , "false" , mountOptions )
58
+ pvc := pvcJig .CreateAndAwaitPVCOrFailFSS (f .Namespace .Name , pv .Name , "50Gi" , nil )
59
+ f .VolumeIds = append (f .VolumeIds , pvc .Spec .VolumeName )
60
+ pvcJig .CheckSinglePodReadWrite (f .Namespace .Name , pvc .Name , false , mountOptions )
61
+ })
62
+ // TODO : Uncomment the below test once https://jira-sd.mc1.oracleiaas.com/browse/FSS-132761 is Done.
63
+ /*It("Create PV PVC and POD for FSS in-transit encryption with mount options", func() {
64
+ if setupF.Architecture == "AMD" {
65
+ checkNodeAvailability(f)
66
+ TestEncryptionType(f, []string{"sync", "hard", "noac", "nolock"})
67
+ } else {
68
+ framework.Logf("CSI-FSS Intransit Encryption is not supported on ARM architecture")
69
+ }
70
+ })*/
71
+ })
72
+ })
73
+
74
+ func TestEncryptionType (f * framework.CloudProviderFramework , mountOptions []string ) {
52
75
pvcJig := framework .NewPVCTestJig (f .ClientSet , "csi-fss-e2e-test-intransit" )
53
- pv := pvcJig .CreatePVorFailFSS (f .Namespace .Name , setupF .VolumeHandle , "true" )
76
+ pv := pvcJig .CreatePVorFailFSS (f .Namespace .Name , setupF .VolumeHandle , "true" , mountOptions )
54
77
pvc := pvcJig .CreateAndAwaitPVCOrFailFSS (f .Namespace .Name , pv .Name , "50Gi" , nil )
55
78
f .VolumeIds = append (f .VolumeIds , pvc .Spec .VolumeName )
56
- pvcJig .CheckSinglePodReadWrite (f .Namespace .Name , pvc .Name , true )
79
+ pvcJig .CheckSinglePodReadWrite (f .Namespace .Name , pvc .Name , true , mountOptions )
57
80
}
58
81
59
- var _ = Describe ("Multiple Pods FSS test" , func () {
82
+ var _ = Describe ("Multiple Pods Static FSS test" , func () {
60
83
f := framework .NewDefaultFramework ("multiple-pod" )
61
- Context ("[cloudprovider][storage][csi][fss]" , func () {
84
+ Context ("[cloudprovider][storage][csi][fss][static] " , func () {
62
85
It ("Multiple Pods should be able to read write same file" , func () {
63
86
pvcJig := framework .NewPVCTestJig (f .ClientSet , "csi-fss-e2e-test" )
64
- pv := pvcJig .CreatePVorFailFSS (f .Namespace .Name , setupF .VolumeHandle , "false" )
87
+ pv := pvcJig .CreatePVorFailFSS (f .Namespace .Name , setupF .VolumeHandle , "false" , [] string {} )
65
88
pvc := pvcJig .CreateAndAwaitPVCOrFailFSS (f .Namespace .Name , pv .Name , "50Gi" , nil )
66
89
f .VolumeIds = append (f .VolumeIds , pvc .Spec .VolumeName )
67
90
pvcJig .CheckMultiplePodReadWrite (f .Namespace .Name , pvc .Name , false )
@@ -71,7 +94,7 @@ var _ = Describe("Multiple Pods FSS test", func() {
71
94
if setupF .Architecture == "AMD" {
72
95
checkNodeAvailability (f )
73
96
pvcJig := framework .NewPVCTestJig (f .ClientSet , "csi-fss-e2e-test" )
74
- pv := pvcJig .CreatePVorFailFSS (f .Namespace .Name , setupF .VolumeHandle , "true" )
97
+ pv := pvcJig .CreatePVorFailFSS (f .Namespace .Name , setupF .VolumeHandle , "true" , [] string {} )
75
98
pvc := pvcJig .CreateAndAwaitPVCOrFailFSS (f .Namespace .Name , pv .Name , "50Gi" , nil )
76
99
f .VolumeIds = append (f .VolumeIds , pvc .Spec .VolumeName )
77
100
pvcJig .CheckMultiplePodReadWrite (f .Namespace .Name , pvc .Name , true )
@@ -82,9 +105,9 @@ var _ = Describe("Multiple Pods FSS test", func() {
82
105
})
83
106
})
84
107
85
- func checkNodeAvailability (f * framework.CloudProviderFramework ){
108
+ func checkNodeAvailability (f * framework.CloudProviderFramework ) {
86
109
pvcJig := framework .NewPVCTestJig (f .ClientSet , "csi-fss-e2e-test" )
87
- nodeList , err := pvcJig .KubeClient .CoreV1 ().Nodes ().List (context .Background (),v12.ListOptions {LabelSelector : "oke.oraclecloud.com/e2e.oci-fss-util" })
110
+ nodeList , err := pvcJig .KubeClient .CoreV1 ().Nodes ().List (context .Background (), v12.ListOptions {LabelSelector : "oke.oraclecloud.com/e2e.oci-fss-util" })
88
111
if err != nil {
89
112
framework .Logf ("Error getting applicable nodes: %v" , err )
90
113
}
0 commit comments