Skip to content

Commit

Permalink
add error case test
Browse files Browse the repository at this point in the history
  • Loading branch information
scanlonp committed Jan 11, 2024
1 parent 38a9e36 commit 5fdfa97
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/aws-cdk-lib/aws-ec2/test/vpc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
TrafficDirection,
Vpc,
IpAddresses,
Ipv6Addresses,
InterfaceVpcEndpointAwsService,
IpProtocol,
} from '../lib';
Expand Down Expand Up @@ -2464,6 +2465,17 @@ describe('vpc', () => {
},
});
});

test('error should occur if IPv6 properties are provided for a non-dual-stack VPC', () => {
// GIVEN
const app = new App();
const stack = new Stack(app, 'NonDualStackStack');

// WHEN
expect(() => new Vpc(stack, 'Vpc', {
ipv6Addresses: Ipv6Addresses.amazonProvided(),
})).toThrow();
});
});

function getTestStack(): Stack {
Expand Down

0 comments on commit 5fdfa97

Please sign in to comment.