@@ -71,7 +71,7 @@ var _ = Describe("GCE PD CSI Driver", func() {
71
71
instance := testContext .Instance
72
72
73
73
// Create Disk
74
- volName , volID := createAndValidateUniqueZonalDisk (client , p , z )
74
+ volName , volID := createAndValidateUniqueZonalDisk (client , p , z , standardDiskType )
75
75
76
76
defer func () {
77
77
// Delete Disk
@@ -96,7 +96,7 @@ var _ = Describe("GCE PD CSI Driver", func() {
96
96
instance := testContext .Instance
97
97
98
98
// Create Disk
99
- volName , volID := createAndValidateUniqueZonalDisk (client , p , z )
99
+ volName , volID := createAndValidateUniqueZonalDisk (client , p , z , standardDiskType )
100
100
101
101
defer func () {
102
102
// Delete Disk
@@ -168,7 +168,7 @@ var _ = Describe("GCE PD CSI Driver", func() {
168
168
instance := testContext .Instance
169
169
170
170
// Create Disk
171
- volName , volID := createAndValidateUniqueZonalDisk (client , p , z )
171
+ volName , volID := createAndValidateUniqueZonalDisk (client , p , z , standardDiskType )
172
172
173
173
defer func () {
174
174
// Delete Disk
@@ -267,7 +267,7 @@ var _ = Describe("GCE PD CSI Driver", func() {
267
267
client := testContext .Client
268
268
instance := testContext .Instance
269
269
270
- volName , _ := createAndValidateUniqueZonalDisk (client , p , z )
270
+ volName , _ := createAndValidateUniqueZonalDisk (client , p , z , standardDiskType )
271
271
272
272
underSpecifiedID := common .GenerateUnderspecifiedVolumeID (volName , true /* isZonal */ )
273
273
@@ -414,7 +414,7 @@ var _ = Describe("GCE PD CSI Driver", func() {
414
414
p , z , _ := testContext .Instance .GetIdentity ()
415
415
client := testContext .Client
416
416
417
- volName , volID := createAndValidateUniqueZonalDisk (client , p , z )
417
+ volName , volID := createAndValidateUniqueZonalDisk (client , p , z , standardDiskType )
418
418
419
419
// Create Snapshot
420
420
snapshotName := testNamePrefix + string (uuid .NewUUID ())
@@ -620,10 +620,10 @@ var _ = Describe("GCE PD CSI Driver", func() {
620
620
621
621
nodeID := testContext .Instance .GetNodeID ()
622
622
623
- _ , volID := createAndValidateUniqueZonalDisk (client , p , z )
623
+ _ , volID := createAndValidateUniqueZonalDisk (client , p , z , standardDiskType )
624
624
defer deleteVolumeOrError (client , volID )
625
625
626
- _ , secondVolID := createAndValidateUniqueZonalDisk (client , p , z )
626
+ _ , secondVolID := createAndValidateUniqueZonalDisk (client , p , z , standardDiskType )
627
627
defer deleteVolumeOrError (client , secondVolID )
628
628
629
629
// Attach volID to current instance
@@ -722,7 +722,7 @@ var _ = Describe("GCE PD CSI Driver", func() {
722
722
client := testContext .Client
723
723
instance := testContext .Instance
724
724
725
- volName , volID := createAndValidateUniqueZonalDisk (client , p , z )
725
+ volName , volID := createAndValidateUniqueZonalDisk (client , p , z , standardDiskType )
726
726
727
727
defer func () {
728
728
// Delete Disk
@@ -759,7 +759,7 @@ var _ = Describe("GCE PD CSI Driver", func() {
759
759
client := testContext .Client
760
760
instance := testContext .Instance
761
761
762
- volName , volID := createAndValidateUniqueZonalDisk (client , p , z )
762
+ volName , volID := createAndValidateUniqueZonalDisk (client , p , z , standardDiskType )
763
763
764
764
defer func () {
765
765
// Delete Disk
@@ -801,7 +801,7 @@ var _ = Describe("GCE PD CSI Driver", func() {
801
801
zone := "us-east1-a"
802
802
803
803
// Create and Validate Disk
804
- volName , volID := createAndValidateUniqueZonalMultiWriterDisk (client , p , zone )
804
+ volName , volID := createAndValidateUniqueZonalMultiWriterDisk (client , p , zone , standardDiskType )
805
805
806
806
defer func () {
807
807
// Delete Disk
@@ -823,7 +823,7 @@ var _ = Describe("GCE PD CSI Driver", func() {
823
823
instance := testContext .Instance
824
824
825
825
// Create and Validate Disk
826
- volName , volID := createAndValidateUniqueZonalMultiWriterDisk (client , p , z )
826
+ volName , volID := createAndValidateUniqueZonalMultiWriterDisk (client , p , z , standardDiskType )
827
827
828
828
defer func () {
829
829
// Delete Disk
@@ -903,7 +903,7 @@ var _ = Describe("GCE PD CSI Driver", func() {
903
903
client := testContext .Client
904
904
905
905
// Create Disk
906
- volName , volID := createAndValidateUniqueZonalDisk (client , p , z )
906
+ volName , volID := createAndValidateUniqueZonalDisk (client , p , z , standardDiskType )
907
907
908
908
// Create Snapshot
909
909
snapshotName := testNamePrefix + string (uuid .NewUUID ())
@@ -964,7 +964,7 @@ var _ = Describe("GCE PD CSI Driver", func() {
964
964
client := testContext .Client
965
965
966
966
// Create Disk
967
- volName , volID := createAndValidateUniqueZonalDisk (client , p , z )
967
+ volName , volID := createAndValidateUniqueZonalDisk (client , p , z , standardDiskType )
968
968
969
969
// Create Snapshot
970
970
snapshotName := testNamePrefix + string (uuid .NewUUID ())
@@ -1025,7 +1025,7 @@ var _ = Describe("GCE PD CSI Driver", func() {
1025
1025
p , z , _ := controllerInstance .GetIdentity ()
1026
1026
1027
1027
// Create Source Disk
1028
- _ , srcVolID := createAndValidateUniqueZonalDisk (controllerClient , p , z )
1028
+ _ , srcVolID := createAndValidateUniqueZonalDisk (controllerClient , p , z , standardDiskType )
1029
1029
1030
1030
// Create Disk
1031
1031
volName := testNamePrefix + string (uuid .NewUUID ())
@@ -1167,7 +1167,7 @@ func equalWithinEpsilon(a, b, epsiolon int64) bool {
1167
1167
return b - a < epsiolon
1168
1168
}
1169
1169
1170
- func createAndValidateUniqueZonalDisk (client * remote.CsiClient , project , zone string ) (volName , volID string ) {
1170
+ func createAndValidateUniqueZonalDisk (client * remote.CsiClient , project , zone string , diskType string ) (volName , volID string ) {
1171
1171
// Create Disk
1172
1172
var err error
1173
1173
volName = testNamePrefix + string (uuid .NewUUID ())
@@ -1184,7 +1184,7 @@ func createAndValidateUniqueZonalDisk(client *remote.CsiClient, project, zone st
1184
1184
// Validate Disk Created
1185
1185
cloudDisk , err := computeService .Disks .Get (project , zone , volName ).Do ()
1186
1186
Expect (err ).To (BeNil (), "Could not get disk from cloud directly" )
1187
- Expect (cloudDisk .Type ).To (ContainSubstring (standardDiskType ))
1187
+ Expect (cloudDisk .Type ).To (ContainSubstring (diskType ))
1188
1188
Expect (cloudDisk .Status ).To (Equal (readyState ))
1189
1189
Expect (cloudDisk .SizeGb ).To (Equal (defaultSizeGb ))
1190
1190
Expect (cloudDisk .Name ).To (Equal (volName ))
@@ -1203,7 +1203,7 @@ func deleteVolumeOrError(client *remote.CsiClient, volID string) {
1203
1203
Expect (gce .IsGCEError (err , "notFound" )).To (BeTrue (), "Expected disk to not be found" )
1204
1204
}
1205
1205
1206
- func createAndValidateUniqueZonalMultiWriterDisk (client * remote.CsiClient , project , zone string ) (string , string ) {
1206
+ func createAndValidateUniqueZonalMultiWriterDisk (client * remote.CsiClient , project , zone string , diskType string ) (string , string ) {
1207
1207
// Create Disk
1208
1208
volName := testNamePrefix + string (uuid .NewUUID ())
1209
1209
volID , err := client .CreateVolumeWithCaps (volName , nil , defaultMwSizeGb ,
@@ -1229,7 +1229,7 @@ func createAndValidateUniqueZonalMultiWriterDisk(client *remote.CsiClient, proje
1229
1229
// Validate Disk Created
1230
1230
cloudDisk , err := computeAlphaService .Disks .Get (project , zone , volName ).Do ()
1231
1231
Expect (err ).To (BeNil (), "Could not get disk from cloud directly" )
1232
- Expect (cloudDisk .Type ).To (ContainSubstring (standardDiskType ))
1232
+ Expect (cloudDisk .Type ).To (ContainSubstring (diskType ))
1233
1233
Expect (cloudDisk .Status ).To (Equal (readyState ))
1234
1234
Expect (cloudDisk .SizeGb ).To (Equal (defaultMwSizeGb ))
1235
1235
Expect (cloudDisk .Name ).To (Equal (volName ))
0 commit comments