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