@@ -81,6 +81,106 @@ var _ = Describe("CSI Volume Creation", func() {
8181 })
8282})
8383
84+ var _ = Describe ("CSI Volume Creation with different fstypes" , func () {
85+ f := framework .NewDefaultFramework ("csi-fstypes" )
86+ Context ("[cloudprovider][storage][csi][fstypes][iSCSI]" , func () {
87+ It ("Create PVC with fstype as XFS" , func () {
88+ pvcJig := framework .NewPVCTestJig (f .ClientSet , "csi-provisioner-e2e-tests-fstype-xfs" )
89+
90+ scName := f .CreateStorageClassOrFail (framework .ClassOCIXfs , "blockvolume.csi.oraclecloud.com" , map [string ]string {framework .FstypeKey : "xfs" }, pvcJig .Labels , "WaitForFirstConsumer" , true )
91+ pvc := pvcJig .CreateAndAwaitPVCOrFailCSI (f .Namespace .Name , framework .MaxVolumeBlock , scName , nil )
92+ f .VolumeIds = append (f .VolumeIds , pvc .Spec .VolumeName )
93+ podName := pvcJig .NewPodForCSI ("app-xfs" , f .Namespace .Name , pvc .Name , setupF .AdLabel )
94+
95+ time .Sleep (60 * time .Second ) //waiting for pod to up and running
96+
97+ pvcJig .CheckFilesystemTypeOfVolumeInsidePod (f .Namespace .Name , podName , "xfs" )
98+ _ = f .DeleteStorageClass (framework .ClassOCIXfs )
99+ })
100+ It ("Create PVC with fstype as EXT3" , func () {
101+ pvcJig := framework .NewPVCTestJig (f .ClientSet , "csi-provisioner-e2e-tests-fstype-ext3" )
102+
103+ scName := f .CreateStorageClassOrFail (framework .ClassOCIExt3 , "blockvolume.csi.oraclecloud.com" , map [string ]string {framework .FstypeKey : "ext3" }, pvcJig .Labels , "WaitForFirstConsumer" , true )
104+ pvc := pvcJig .CreateAndAwaitPVCOrFailCSI (f .Namespace .Name , framework .MaxVolumeBlock , scName , nil )
105+ f .VolumeIds = append (f .VolumeIds , pvc .Spec .VolumeName )
106+ podName := pvcJig .NewPodForCSI ("app-ext3" , f .Namespace .Name , pvc .Name , setupF .AdLabel )
107+
108+ time .Sleep (60 * time .Second ) //waiting for pod to up and running
109+
110+ pvcJig .CheckFilesystemTypeOfVolumeInsidePod (f .Namespace .Name , podName , "ext3" )
111+ _ = f .DeleteStorageClass (framework .ClassOCIExt3 )
112+ })
113+ })
114+ Context ("[cloudprovider][storage][csi][fstypes][paravirtualized]" , func () {
115+ It ("Create PVC with fstype as XFS with paravirtualized attachment type" , func () {
116+ pvcJig := framework .NewPVCTestJig (f .ClientSet , "csi-provisioner-e2e-tests-fstype-xfs" )
117+
118+ scName := f .CreateStorageClassOrFail (framework .ClassOCIXfs , "blockvolume.csi.oraclecloud.com" , map [string ]string {framework .FstypeKey : "xfs" , framework .KmsKey : setupF .CMEKKMSKey , framework .AttachmentType : framework .AttachmentTypeParavirtualized }, pvcJig .Labels , "WaitForFirstConsumer" , true )
119+ pvc := pvcJig .CreateAndAwaitPVCOrFailCSI (f .Namespace .Name , framework .MaxVolumeBlock , scName , nil )
120+ f .VolumeIds = append (f .VolumeIds , pvc .Spec .VolumeName )
121+ podName := pvcJig .NewPodForCSI ("app-xfs" , f .Namespace .Name , pvc .Name , setupF .AdLabel )
122+ pvcJig .CheckCMEKKey (f .Client .BlockStorage (), pvc .Name , f .Namespace .Name , setupF .CMEKKMSKey )
123+ pvcJig .CheckAttachmentTypeAndEncryptionType (f .Client .Compute (), pvc .Name , f .Namespace .Name , podName , framework .AttachmentTypeParavirtualized )
124+ time .Sleep (60 * time .Second ) //waiting for pod to up and running
125+
126+ pvcJig .CheckFilesystemTypeOfVolumeInsidePod (f .Namespace .Name , podName , "xfs" )
127+ _ = f .DeleteStorageClass (framework .ClassOCIXfs )
128+ })
129+ })
130+ Context ("[cloudprovider][storage][csi][expand][fstypes][iSCSI]" , func () {
131+ It ("Expand PVC VolumeSize from 50Gi to 100Gi and asserts size, file existence and file corruptions for iSCSI volumes with xfs filesystem type" , func () {
132+ var size = "100Gi"
133+ pvcJig := framework .NewPVCTestJig (f .ClientSet , "csi-pvc-expand-to-100gi-iscsi-xfs" )
134+
135+ scName := f .CreateStorageClassOrFail (framework .ClassOCIXfs , "blockvolume.csi.oraclecloud.com" ,
136+ map [string ]string {framework .AttachmentType : framework .AttachmentTypeISCSI , framework .FstypeKey : "xfs" },
137+ pvcJig .Labels , "WaitForFirstConsumer" , true )
138+ pvc := pvcJig .CreateAndAwaitPVCOrFailCSI (f .Namespace .Name , framework .MinVolumeBlock , scName , nil )
139+ podName := pvcJig .NewPodForCSI ("expanded-pvc-app" , f .Namespace .Name , pvc .Name , setupF .AdLabel )
140+
141+ time .Sleep (60 * time .Second ) //waiting for pod to up and running
142+
143+ expandedPvc := pvcJig .UpdateAndAwaitPVCOrFailCSI (pvc , pvc .Namespace , size , nil )
144+
145+ time .Sleep (120 * time .Second ) //waiting for expanded pvc to be functional
146+
147+ pvcJig .CheckFilesystemTypeOfVolumeInsidePod (f .Namespace .Name , podName , "xfs" )
148+ pvcJig .CheckVolumeCapacity ("100Gi" , expandedPvc .Name , f .Namespace .Name )
149+ pvcJig .CheckFileExists (f .Namespace .Name , podName , "/data" , "testdata.txt" )
150+ pvcJig .CheckFileCorruption (f .Namespace .Name , podName , "/data" , "testdata.txt" )
151+ pvcJig .CheckExpandedVolumeReadWrite (f .Namespace .Name , podName )
152+ pvcJig .CheckUsableVolumeSizeInsidePod (f .Namespace .Name , podName , "100G" )
153+ f .VolumeIds = append (f .VolumeIds , pvc .Spec .VolumeName )
154+ _ = f .DeleteStorageClass (framework .ClassOCIXfs )
155+ })
156+ It ("Expand PVC VolumeSize from 50Gi to 100Gi and asserts size, file existence and file corruptions for iSCSI volumes with ext3 filesystem type" , func () {
157+ var size = "100Gi"
158+ pvcJig := framework .NewPVCTestJig (f .ClientSet , "csi-pvc-expand-to-100gi-iscsi-ext3" )
159+
160+ scName := f .CreateStorageClassOrFail (framework .ClassOCIExt3 , "blockvolume.csi.oraclecloud.com" ,
161+ map [string ]string {framework .AttachmentType : framework .AttachmentTypeISCSI , framework .FstypeKey : "ext3" },
162+ pvcJig .Labels , "WaitForFirstConsumer" , true )
163+ pvc := pvcJig .CreateAndAwaitPVCOrFailCSI (f .Namespace .Name , framework .MinVolumeBlock , scName , nil )
164+ podName := pvcJig .NewPodForCSI ("expanded-pvc-app" , f .Namespace .Name , pvc .Name , setupF .AdLabel )
165+
166+ time .Sleep (60 * time .Second ) //waiting for pod to up and running
167+
168+ expandedPvc := pvcJig .UpdateAndAwaitPVCOrFailCSI (pvc , pvc .Namespace , size , nil )
169+
170+ time .Sleep (120 * time .Second ) //waiting for expanded pvc to be functional
171+
172+ pvcJig .CheckFilesystemTypeOfVolumeInsidePod (f .Namespace .Name , podName , "ext3" )
173+ pvcJig .CheckVolumeCapacity ("100Gi" , expandedPvc .Name , f .Namespace .Name )
174+ pvcJig .CheckFileExists (f .Namespace .Name , podName , "/data" , "testdata.txt" )
175+ pvcJig .CheckFileCorruption (f .Namespace .Name , podName , "/data" , "testdata.txt" )
176+ pvcJig .CheckExpandedVolumeReadWrite (f .Namespace .Name , podName )
177+ pvcJig .CheckUsableVolumeSizeInsidePod (f .Namespace .Name , podName , "99G" )
178+ f .VolumeIds = append (f .VolumeIds , pvc .Spec .VolumeName )
179+ _ = f .DeleteStorageClass (framework .ClassOCIExt3 )
180+ })
181+ })
182+ })
183+
84184var _ = Describe ("CSI Volume Expansion iSCSI" , func () {
85185 f := framework .NewDefaultFramework ("csi-expansion" )
86186 Context ("[cloudprovider][storage][csi][expand][iSCSI]" , func () {
@@ -104,9 +204,8 @@ var _ = Describe("CSI Volume Expansion iSCSI", func() {
104204 pvcJig .CheckFileExists (f .Namespace .Name , podName , "/data" , "testdata.txt" )
105205 pvcJig .CheckFileCorruption (f .Namespace .Name , podName , "/data" , "testdata.txt" )
106206 pvcJig .CheckExpandedVolumeReadWrite (f .Namespace .Name , podName )
107- pvcJig .CheckUsableVolumeSizeInsidePod (f .Namespace .Name , podName )
207+ pvcJig .CheckUsableVolumeSizeInsidePod (f .Namespace .Name , podName , "99G" )
108208 f .VolumeIds = append (f .VolumeIds , pvc .Spec .VolumeName )
109- _ = f .DeleteStorageClass (framework .ClassOCICSIExpand )
110209 })
111210 })
112211})
@@ -134,7 +233,7 @@ var _ = Describe("CSI Volume Expansion iSCSI", func() {
134233 pvcJig .CheckFileExists (f .Namespace .Name , podName , "/data" , "testdata.txt" )
135234 pvcJig .CheckFileCorruption (f .Namespace .Name , podName , "/data" , "testdata.txt" )
136235 pvcJig .CheckExpandedVolumeReadWrite (f .Namespace .Name , podName )
137- pvcJig .CheckUsableVolumeSizeInsidePod (f .Namespace .Name , podName )
236+ pvcJig .CheckUsableVolumeSizeInsidePod (f .Namespace .Name , podName , "99G" )
138237 f .VolumeIds = append (f .VolumeIds , pvc .Spec .VolumeName )
139238 _ = f .DeleteStorageClass (framework .ClassOCICSIExpand )
140239 })
@@ -294,7 +393,7 @@ var _ = Describe("CSI Volume Expansion Paravirtualized", func() {
294393 pvcJig .CheckFileExists (f .Namespace .Name , podName , "/data" , "testdata.txt" )
295394 pvcJig .CheckFileCorruption (f .Namespace .Name , podName , "/data" , "testdata.txt" )
296395 pvcJig .CheckExpandedVolumeReadWrite (f .Namespace .Name , podName )
297- pvcJig .CheckUsableVolumeSizeInsidePod (f .Namespace .Name , podName )
396+ pvcJig .CheckUsableVolumeSizeInsidePod (f .Namespace .Name , podName , "99G" )
298397 f .VolumeIds = append (f .VolumeIds , pvc .Spec .VolumeName )
299398 _ = f .DeleteStorageClass (framework .ClassOCICSIExpand )
300399 })
0 commit comments