Skip to content

Commit 2550589

Browse files
authored
chore: upgrade remaining integ tests from nodejs 10 to 14 (#19770)
---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `cdk-integ` to deploy the infrastructure and generate the snapshot (i.e. `cdk-integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 9a518c5 commit 2550589

25 files changed

+94
-92
lines changed

packages/@aws-cdk/aws-cloudformation/test/integ.nested-stack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class MyNestedStack extends NestedStack {
4141

4242
if (props.subscriber) {
4343
new lambda.Function(this, 'fn', {
44-
runtime: lambda.Runtime.NODEJS_10_X,
44+
runtime: lambda.Runtime.NODEJS_14_X,
4545
code: lambda.Code.fromInline('console.error("hi")'),
4646
handler: 'index.handler',
4747
environment: {

packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-assets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class MyNestedStack extends NestedStack {
1515

1616
new lambda.Function(this, 'Handler', {
1717
code: lambda.Code.fromAsset(path.join(__dirname, 'asset-directory-fixture')),
18-
runtime: lambda.Runtime.NODEJS_10_X,
18+
runtime: lambda.Runtime.NODEJS_14_X,
1919
handler: 'index.handler',
2020
});
2121
}

packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const lambdaCode = lambda.Code.fromCfnParameters();
1414
new lambda.Function(lambdaStack, 'Lambda', {
1515
code: lambdaCode,
1616
handler: 'index.handler',
17-
runtime: lambda.Runtime.NODEJS_10_X,
17+
runtime: lambda.Runtime.NODEJS_14_X,
1818
});
1919
// other resources that your Lambda needs, added to the lambdaStack...
2020

packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-pipeline.expected.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@
883883
]
884884
},
885885
"Handler": "index.handler",
886-
"Runtime": "nodejs10.x"
886+
"Runtime": "nodejs14.x"
887887
},
888888
"DependsOn": [
889889
"LambdaFunServiceRoleDefaultPolicy217FED83",

packages/@aws-cdk/aws-codepipeline-actions/test/integ.lambda-pipeline.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const lambdaFun = new lambda.Function(stack, 'LambdaFun', {
3434
};
3535
`),
3636
handler: 'index.handler',
37-
runtime: lambda.Runtime.NODEJS_10_X,
37+
runtime: lambda.Runtime.NODEJS_14_X,
3838
});
3939
const lambdaStage = pipeline.addStage({ stageName: 'Lambda' });
4040
lambdaStage.addAction(new cpactions.LambdaInvokeAction({

packages/@aws-cdk/aws-config/test/integ.rule.lit.expected.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@
4949
"Code": {
5050
"ZipFile": "exports.handler = (event) => console.log(event);"
5151
},
52-
"Handler": "index.handler",
5352
"Role": {
5453
"Fn::GetAtt": [
5554
"CustomFunctionServiceRoleD3F73B79",
5655
"Arn"
5756
]
5857
},
59-
"Runtime": "nodejs10.x"
58+
"Handler": "index.handler",
59+
"Runtime": "nodejs14.x"
6060
},
6161
"DependsOn": [
6262
"CustomFunctionServiceRoleD3F73B79"
@@ -224,4 +224,4 @@
224224
}
225225
}
226226
}
227-
}
227+
}

packages/@aws-cdk/aws-config/test/integ.rule.lit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class ConfigStack extends cdk.Stack {
1515
const fn = new lambda.Function(this, 'CustomFunction', {
1616
code: lambda.AssetCode.fromInline('exports.handler = (event) => console.log(event);'),
1717
handler: 'index.handler',
18-
runtime: lambda.Runtime.NODEJS_10_X,
18+
runtime: lambda.Runtime.NODEJS_14_X,
1919
});
2020

2121
new config.CustomRule(this, 'Custom', {

packages/@aws-cdk/aws-config/test/integ.scoped-rule.expected.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@
4949
"Code": {
5050
"ZipFile": "exports.handler = (event) => console.log(event);"
5151
},
52-
"Handler": "index.handler",
5352
"Role": {
5453
"Fn::GetAtt": [
5554
"CustomFunctionServiceRoleD3F73B79",
5655
"Arn"
5756
]
5857
},
59-
"Runtime": "nodejs10.x"
58+
"Handler": "index.handler",
59+
"Runtime": "nodejs14.x"
6060
},
6161
"DependsOn": [
6262
"CustomFunctionServiceRoleD3F73B79"
@@ -109,4 +109,4 @@
109109
]
110110
}
111111
}
112-
}
112+
}

packages/@aws-cdk/aws-config/test/integ.scoped-rule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const stack = new cdk.Stack(app, 'aws-cdk-config-rule-scoped-integ');
99
const fn = new lambda.Function(stack, 'CustomFunction', {
1010
code: lambda.AssetCode.fromInline('exports.handler = (event) => console.log(event);'),
1111
handler: 'index.handler',
12-
runtime: lambda.Runtime.NODEJS_10_X,
12+
runtime: lambda.Runtime.NODEJS_14_X,
1313
});
1414

1515
new config.CustomRule(stack, 'Custom', {

packages/@aws-cdk/aws-events-targets/test/lambda/integ.events.expected.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
]
4545
},
4646
"Handler": "index.handler",
47-
"Runtime": "nodejs10.x"
47+
"Runtime": "nodejs14.x"
4848
},
4949
"DependsOn": [
5050
"MyFuncServiceRole54065130"

packages/@aws-cdk/aws-events-targets/test/lambda/integ.events.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const app = new cdk.App();
99
const stack = new cdk.Stack(app, 'lambda-events');
1010

1111
const fn = new lambda.Function(stack, 'MyFunc', {
12-
runtime: lambda.Runtime.NODEJS_10_X,
12+
runtime: lambda.Runtime.NODEJS_14_X,
1313
handler: 'index.handler',
1414
code: lambda.Code.fromInline(`exports.handler = ${handler.toString()}`),
1515
});

packages/@aws-cdk/aws-lambda-destinations/test/integ.destinations.expected.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
]
9090
},
9191
"Handler": "index.handler",
92-
"Runtime": "nodejs10.x"
92+
"Runtime": "nodejs14.x"
9393
},
9494
"DependsOn": [
9595
"SnsSqsServiceRoleDefaultPolicy82E7B09F",
@@ -174,7 +174,7 @@
174174
]
175175
},
176176
"Handler": "index.handler",
177-
"Runtime": "nodejs10.x"
177+
"Runtime": "nodejs14.x"
178178
},
179179
"DependsOn": [
180180
"OnSuccesServiceRole75E399CF"
@@ -290,7 +290,7 @@
290290
]
291291
},
292292
"Handler": "index.handler",
293-
"Runtime": "nodejs10.x"
293+
"Runtime": "nodejs14.x"
294294
},
295295
"DependsOn": [
296296
"EventBusLambdaServiceRoleDefaultPolicy5BB7FEB6",

packages/@aws-cdk/aws-lambda-destinations/test/integ.destinations.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class TestStack extends Stack {
1919
const queue = new sqs.Queue(this, 'Queue');
2020

2121
const fn = new lambda.Function(this, 'SnsSqs', {
22-
runtime: lambda.Runtime.NODEJS_10_X,
22+
runtime: lambda.Runtime.NODEJS_14_X,
2323
handler: 'index.handler',
2424
code: lambda.Code.fromInline(`exports.handler = async (event) => {
2525
if (event === 'OK') return 'success';
@@ -32,15 +32,15 @@ class TestStack extends Stack {
3232
});
3333

3434
const onSuccessLambda = new lambda.Function(this, 'OnSucces', {
35-
runtime: lambda.Runtime.NODEJS_10_X,
35+
runtime: lambda.Runtime.NODEJS_14_X,
3636
handler: 'index.handler',
3737
code: lambda.Code.fromInline(`exports.handler = async (event) => {
3838
console.log(event);
3939
};`),
4040
});
4141

4242
new lambda.Function(this, 'EventBusLambda', {
43-
runtime: lambda.Runtime.NODEJS_10_X,
43+
runtime: lambda.Runtime.NODEJS_14_X,
4444
handler: 'index.handler',
4545
code: lambda.Code.fromInline(`exports.handler = async (event) => {
4646
if (event === 'OK') return 'success';

packages/@aws-cdk/aws-lambda-destinations/test/integ.lambda-chain.expected.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
]
8585
},
8686
"Handler": "index.handler",
87-
"Runtime": "nodejs10.x"
87+
"Runtime": "nodejs14.x"
8888
},
8989
"DependsOn": [
9090
"FirstServiceRoleDefaultPolicyB5EF41C4",
@@ -353,7 +353,7 @@
353353
]
354354
},
355355
"Handler": "index.handler",
356-
"Runtime": "nodejs10.x"
356+
"Runtime": "nodejs14.x"
357357
},
358358
"DependsOn": [
359359
"SecondServiceRoleDefaultPolicyB593E14A",
@@ -498,7 +498,7 @@
498498
]
499499
},
500500
"Handler": "index.handler",
501-
"Runtime": "nodejs10.x"
501+
"Runtime": "nodejs14.x"
502502
},
503503
"DependsOn": [
504504
"ThirdServiceRole42701801"
@@ -548,7 +548,7 @@
548548
]
549549
},
550550
"Handler": "index.handler",
551-
"Runtime": "nodejs10.x"
551+
"Runtime": "nodejs14.x"
552552
},
553553
"DependsOn": [
554554
"ErrorServiceRoleCE484966"

packages/@aws-cdk/aws-lambda-destinations/test/integ.lambda-chain.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class TestStack extends Stack {
2020
super(scope, id, props);
2121

2222
const lambdaProps: lambda.FunctionProps = {
23-
runtime: lambda.Runtime.NODEJS_10_X,
23+
runtime: lambda.Runtime.NODEJS_14_X,
2424
handler: 'index.handler',
2525
code: lambda.Code.fromInline(`exports.handler = async (event) => {
2626
console.log('Event: %j', event);

packages/@aws-cdk/aws-lambda-event-sources/test/integ.kinesiswithdlq.expected.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
]
9393
},
9494
"Handler": "index.handler",
95-
"Runtime": "nodejs10.x"
95+
"Runtime": "nodejs14.x"
9696
},
9797
"DependsOn": [
9898
"FServiceRoleDefaultPolicy17A19BFA",

packages/@aws-cdk/aws-lambda-event-sources/test/integ.kinesiswithdlq.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class KinesisWithDLQTest extends Stack {
2222
super(scope, id);
2323

2424
const fn = new lambda.Function(this, 'F', {
25-
runtime: lambda.Runtime.NODEJS_10_X,
25+
runtime: lambda.Runtime.NODEJS_14_X,
2626
handler: 'index.handler',
2727
code: lambda.Code.fromInline(`exports.handler = ${handler.toString()}`),
2828
});

packages/@aws-cdk/aws-route53-targets/test/integ.api-gateway-domain-name.expected.json

Lines changed: 57 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@
3737
"Code": {
3838
"ZipFile": "exports.handler = async () => {\n return {\n statusCode: '200',\n body: 'hello, world!'\n };\n };"
3939
},
40-
"Handler": "index.handler",
4140
"Role": {
4241
"Fn::GetAtt": [
4342
"HandlerServiceRoleFCDC14AE",
4443
"Arn"
4544
]
4645
},
47-
"Runtime": "nodejs10.x"
46+
"Handler": "index.handler",
47+
"Runtime": "nodejs14.x"
4848
},
4949
"DependsOn": [
5050
"HandlerServiceRoleFCDC14AE"
@@ -56,33 +56,6 @@
5656
"Name": "api"
5757
}
5858
},
59-
"apiDeployment149F1294891f10d69bae7c4d19bdee7af013a950": {
60-
"Type": "AWS::ApiGateway::Deployment",
61-
"Properties": {
62-
"RestApiId": {
63-
"Ref": "apiC8550315"
64-
},
65-
"Description": "Automatically created by the RestApi construct"
66-
},
67-
"DependsOn": [
68-
"apiproxyANY7F13F09C",
69-
"apiproxy4EA44110",
70-
"apiANYB3DF8C3C"
71-
]
72-
},
73-
"apiDeploymentStageprod896C8101": {
74-
"Type": "AWS::ApiGateway::Stage",
75-
"Properties": {
76-
"RestApiId": {
77-
"Ref": "apiC8550315"
78-
},
79-
"DeploymentId": {
80-
"Ref": "apiDeployment149F1294891f10d69bae7c4d19bdee7af013a950"
81-
},
82-
"StageName": "prod"
83-
},
84-
"DependsOn": ["apiAccount57E28B43"]
85-
},
8659
"apiCloudWatchRoleAC81D93E": {
8760
"Type": "AWS::IAM::Role",
8861
"Properties": {
@@ -128,6 +101,61 @@
128101
"apiC8550315"
129102
]
130103
},
104+
"apiDeployment149F1294891f10d69bae7c4d19bdee7af013a950": {
105+
"Type": "AWS::ApiGateway::Deployment",
106+
"Properties": {
107+
"RestApiId": {
108+
"Ref": "apiC8550315"
109+
},
110+
"Description": "Automatically created by the RestApi construct"
111+
},
112+
"DependsOn": [
113+
"apiproxyANY7F13F09C",
114+
"apiproxy4EA44110",
115+
"apiANYB3DF8C3C"
116+
]
117+
},
118+
"apiDeploymentStageprod896C8101": {
119+
"Type": "AWS::ApiGateway::Stage",
120+
"Properties": {
121+
"RestApiId": {
122+
"Ref": "apiC8550315"
123+
},
124+
"DeploymentId": {
125+
"Ref": "apiDeployment149F1294891f10d69bae7c4d19bdee7af013a950"
126+
},
127+
"StageName": "prod"
128+
},
129+
"DependsOn": [
130+
"apiAccount57E28B43"
131+
]
132+
},
133+
"apiCustomDomain64773C4F": {
134+
"Type": "AWS::ApiGateway::DomainName",
135+
"Properties": {
136+
"DomainName": "example.com",
137+
"EndpointConfiguration": {
138+
"Types": [
139+
"REGIONAL"
140+
]
141+
},
142+
"RegionalCertificateArn": "arn:aws:acm:us-east-1:111111111111:certificate"
143+
}
144+
},
145+
"apiCustomDomainMapawscdkapigwaliasintegapiF4DF08ACCF365F22": {
146+
"Type": "AWS::ApiGateway::BasePathMapping",
147+
"Properties": {
148+
"DomainName": {
149+
"Ref": "apiCustomDomain64773C4F"
150+
},
151+
"RestApiId": {
152+
"Ref": "apiC8550315"
153+
},
154+
"Stage": {
155+
"Ref": "apiDeploymentStageprod896C8101"
156+
}
157+
}
158+
},
131159
"apiproxy4EA44110": {
132160
"Type": "AWS::ApiGateway::Resource",
133161
"Properties": {
@@ -382,32 +410,6 @@
382410
}
383411
}
384412
},
385-
"apiCustomDomain64773C4F": {
386-
"Type": "AWS::ApiGateway::DomainName",
387-
"Properties": {
388-
"DomainName": "example.com",
389-
"EndpointConfiguration": {
390-
"Types": [
391-
"REGIONAL"
392-
]
393-
},
394-
"RegionalCertificateArn": "arn:aws:acm:us-east-1:111111111111:certificate"
395-
}
396-
},
397-
"apiCustomDomainMapawscdkapigwaliasintegapiF4DF08ACCF365F22": {
398-
"Type": "AWS::ApiGateway::BasePathMapping",
399-
"Properties": {
400-
"DomainName": {
401-
"Ref": "apiCustomDomain64773C4F"
402-
},
403-
"RestApiId": {
404-
"Ref": "apiC8550315"
405-
},
406-
"Stage": {
407-
"Ref": "apiDeploymentStageprod896C8101"
408-
}
409-
}
410-
},
411413
"Alias325C5727": {
412414
"Type": "AWS::Route53::RecordSet",
413415
"Properties": {

0 commit comments

Comments
 (0)