@@ -2328,48 +2328,6 @@ describe('fargate service', () => {
23282328 } ) . toThrow ( / ' t h r o u g h p u t ' c a n o n l y b e c o n f i g u r e d w i t h g p 3 v o l u m e t y p e , g o t g p 2 / ) ;
23292329 } ) ;
23302330
2331- test ( 'throw an error if throughput is greater tahn 1000 for volume type gp3' , ( ) => {
2332- // WHEN
2333- container . addMountPoints ( {
2334- containerPath : '/var/lib' ,
2335- readOnly : false ,
2336- sourceVolume : 'nginx-vol' ,
2337- } ) ;
2338-
2339- expect ( ( ) => {
2340- service . addVolume ( new ServiceManagedVolume ( stack , 'EBS Volume' , {
2341- name : 'nginx-vol' ,
2342- managedEBSVolume : {
2343- fileSystemType : ecs . FileSystemType . XFS ,
2344- volumeType : ec2 . EbsDeviceVolumeType . GP3 ,
2345- size : cdk . Size . gibibytes ( 10 ) ,
2346- throughput : 10001 ,
2347- } ,
2348- } ) ) ;
2349- } ) . toThrow ( "'throughput' must be less than or equal to 1000 MiB/s, got 10001 MiB/s" ) ;
2350- } ) ;
2351-
2352- test ( 'throw an error if throughput is greater tahn 1000 for volume type gp3' , ( ) => {
2353- // WHEN
2354- container . addMountPoints ( {
2355- containerPath : '/var/lib' ,
2356- readOnly : false ,
2357- sourceVolume : 'nginx-vol' ,
2358- } ) ;
2359-
2360- expect ( ( ) => {
2361- service . addVolume ( new ServiceManagedVolume ( stack , 'EBS Volume' , {
2362- name : 'nginx-vol' ,
2363- managedEBSVolume : {
2364- fileSystemType : ecs . FileSystemType . XFS ,
2365- volumeType : ec2 . EbsDeviceVolumeType . GP3 ,
2366- size : cdk . Size . gibibytes ( 10 ) ,
2367- throughput : 10001 ,
2368- } ,
2369- } ) ) ;
2370- } ) . toThrow ( "'throughput' must be less than or equal to 1000 MiB/s, got 10001 MiB/s" ) ;
2371- } ) ;
2372-
23732331 test ( 'throw an error if iops is not supported for volume type sc1' , ( ) => {
23742332 // WHEN
23752333 container . addMountPoints ( {
@@ -2580,6 +2538,27 @@ describe('fargate service', () => {
25802538 ] ,
25812539 } ) ;
25822540 } ) ;
2541+
2542+ test ( 'throw an error if throughput is greater than 2000 for volume type gp3' , ( ) => {
2543+ // WHEN
2544+ container . addMountPoints ( {
2545+ containerPath : '/var/lib' ,
2546+ readOnly : false ,
2547+ sourceVolume : 'nginx-vol' ,
2548+ } ) ;
2549+
2550+ expect ( ( ) => {
2551+ service . addVolume ( new ServiceManagedVolume ( stack , 'EBS Volume' , {
2552+ name : 'nginx-vol' ,
2553+ managedEBSVolume : {
2554+ fileSystemType : ecs . FileSystemType . XFS ,
2555+ volumeType : ec2 . EbsDeviceVolumeType . GP3 ,
2556+ size : cdk . Size . gibibytes ( 10 ) ,
2557+ throughput : 2001 ,
2558+ } ,
2559+ } ) ) ;
2560+ } ) . toThrow ( "'throughput' must be less than or equal to 2000 MiB/s, got 2001 MiB/s" ) ;
2561+ } ) ;
25832562 } ) ;
25842563
25852564 describe ( 'When setting up a health check' , ( ) => {
0 commit comments