@@ -2445,62 +2445,7 @@ func TestCreateVolume(t *testing.T) {
24452445 }
24462446 },
24472447 },
2448- {
2449- name : "returns ResourceExhausted with MaxIOPSLimitExceeded error" ,
2450- testFunc : func (t * testing.T ) {
2451- t .Helper ()
2452- req := & csi.CreateVolumeRequest {
2453- Name : "vol-test" ,
2454- CapacityRange : stdCapRange ,
2455- VolumeCapabilities : stdVolCap ,
2456- }
2457-
2458- ctx := t .Context ()
2459-
2460- mockCtl := gomock .NewController (t )
2461- defer mockCtl .Finish ()
24622448
2463- mockCloud := cloud .NewMockCloud (mockCtl )
2464- mockCloud .EXPECT ().CreateDisk (gomock .Eq (ctx ), gomock .Eq (req .GetName ()), gomock .Any ()).Return (nil , cloud .ErrLimitExceeded )
2465-
2466- awsDriver := ControllerService {
2467- cloud : mockCloud ,
2468- inFlight : internal .NewInFlight (),
2469- options : & Options {},
2470- }
2471-
2472- _ , err := awsDriver .CreateVolume (ctx , req )
2473- checkExpectedErrorCode (t , err , codes .ResourceExhausted )
2474- },
2475- },
2476- {
2477- name : "returns ResourceExhausted with VolumeLimitExceeded error" ,
2478- testFunc : func (t * testing.T ) {
2479- t .Helper ()
2480- req := & csi.CreateVolumeRequest {
2481- Name : "vol-test" ,
2482- CapacityRange : stdCapRange ,
2483- VolumeCapabilities : stdVolCap ,
2484- }
2485-
2486- ctx := t .Context ()
2487-
2488- mockCtl := gomock .NewController (t )
2489- defer mockCtl .Finish ()
2490-
2491- mockCloud := cloud .NewMockCloud (mockCtl )
2492- mockCloud .EXPECT ().CreateDisk (gomock .Eq (ctx ), gomock .Eq (req .GetName ()), gomock .Any ()).Return (nil , cloud .ErrLimitExceeded )
2493-
2494- awsDriver := ControllerService {
2495- cloud : mockCloud ,
2496- inFlight : internal .NewInFlight (),
2497- options : & Options {},
2498- }
2499-
2500- _ , err := awsDriver .CreateVolume (ctx , req )
2501- checkExpectedErrorCode (t , err , codes .ResourceExhausted )
2502- },
2503- },
25042449 {
25052450 name : "success user tags override cluster tags" ,
25062451 testFunc : func (t * testing.T ) {
0 commit comments