Skip to content

Commit e00a34d

Browse files
fix(alb): correct naming conventions for VPC and ALB in tests
1 parent d5238e8 commit e00a34d

File tree

1 file changed

+6
-4
lines changed
  • packages/aws-cdk-lib/aws-apigateway/test/integrations

1 file changed

+6
-4
lines changed

packages/aws-cdk-lib/aws-apigateway/test/integrations/alb.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ describe('AlbIntegration', () => {
99
test('minimal setup with ALB', () => {
1010
// GIVEN
1111
const stack = new cdk.Stack();
12-
const vpc = new ec2.Vpc(stack, 'VPC');
13-
const alb = new elbv2.ApplicationLoadBalancer(stack, 'ALB', { vpc });
12+
const vpc = new ec2.Vpc(stack, 'Vpc');
13+
const alb = new elbv2.ApplicationLoadBalancer(stack, 'Alb', { vpc });
1414

15-
const api = new apigateway.RestApi(stack, 'my-api');
15+
const api = new apigateway.RestApi(stack, 'Api');
1616

1717
// WHEN
1818
const integ = new apigateway.AlbIntegration(alb);
@@ -28,7 +28,9 @@ describe('AlbIntegration', () => {
2828
});
2929

3030
// VPC Link V2 should be created
31-
Template.fromStack(stack).resourceCountIs('AWS::ApiGatewayV2::VpcLink', 1);
31+
Template.fromStack(stack).hasResourceProperties('AWS::ApiGatewayV2::VpcLink', {
32+
Name: 'VpcLink-Vpc',
33+
});
3234
});
3335

3436
test('with existing VPC Link V2', () => {

0 commit comments

Comments
 (0)