@@ -418,7 +418,7 @@ func TestCreateVolume(t *testing.T) {
418
418
DirectoryPerms : "777" ,
419
419
BasePath : "test" ,
420
420
GidMin : "1000" ,
421
- GidMax : "1200 " ,
421
+ GidMax : "2000 " ,
422
422
},
423
423
}
424
424
@@ -428,7 +428,7 @@ func TestCreateVolume(t *testing.T) {
428
428
}
429
429
430
430
accessPoints := []* cloud.AccessPoint {}
431
- for i := 0 ; i < 119 ; i ++ {
431
+ for i := 0 ; i < ACCESS_POINT_PER_FS_LIMIT - 1 ; i ++ {
432
432
gidMax , err := strconv .Atoi (req .Parameters [GidMax ])
433
433
if err != nil {
434
434
t .Fatalf ("Failed to convert GidMax Parameter to int." )
@@ -449,12 +449,12 @@ func TestCreateVolume(t *testing.T) {
449
449
AccessPointId : apId ,
450
450
FileSystemId : fsId ,
451
451
PosixUser : & cloud.PosixUser {
452
- Gid : 1081 ,
453
- Uid : 1081 ,
452
+ Gid : 1001 ,
453
+ Uid : 1001 ,
454
454
},
455
455
}
456
456
457
- expectedGid := 1081
457
+ expectedGid := 1001
458
458
mockCloud .EXPECT ().DescribeFileSystem (gomock .Eq (ctx ), gomock .Any ()).Return (fileSystem , nil )
459
459
mockCloud .EXPECT ().ListAccessPoints (gomock .Eq (ctx ), gomock .Any ()).Return (accessPoints , nil )
460
460
mockCloud .EXPECT ().CreateAccessPoint (gomock .Eq (ctx ), gomock .Any (), gomock .Any ()).Return (lastAccessPoint , nil ).
@@ -478,9 +478,8 @@ func TestCreateVolume(t *testing.T) {
478
478
accessPoints = append (accessPoints , lastAccessPoint )
479
479
mockCloud .EXPECT ().DescribeFileSystem (gomock .Eq (ctx ), gomock .Any ()).Return (fileSystem , nil )
480
480
mockCloud .EXPECT ().ListAccessPoints (gomock .Eq (ctx ), gomock .Any ()).Return (accessPoints , nil )
481
- mockCloud .EXPECT ().CreateAccessPoint (gomock .Eq (ctx ), gomock .Any (), gomock .Any ()).Return (lastAccessPoint , nil ).AnyTimes ()
482
481
483
- // All 120 GIDs are taken now, internal limit should take effect causing CreateVolume to fail.
482
+ // All 1000 GIDs are taken now, internal limit should take effect causing CreateVolume to fail.
484
483
_ , err = driver .CreateVolume (ctx , req )
485
484
if err == nil {
486
485
t .Fatalf ("CreateVolume should have failed." )
0 commit comments