Skip to content

Commit

Permalink
chore: upgrade remaining integ tests from nodejs 10 to 14 (#19770)
Browse files Browse the repository at this point in the history
----

### 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*
  • Loading branch information
corymhall committed Apr 5, 2022
1 parent 9a518c5 commit 2550589
Show file tree
Hide file tree
Showing 25 changed files with 94 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class MyNestedStack extends NestedStack {

if (props.subscriber) {
new lambda.Function(this, 'fn', {
runtime: lambda.Runtime.NODEJS_10_X,
runtime: lambda.Runtime.NODEJS_14_X,
code: lambda.Code.fromInline('console.error("hi")'),
handler: 'index.handler',
environment: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class MyNestedStack extends NestedStack {

new lambda.Function(this, 'Handler', {
code: lambda.Code.fromAsset(path.join(__dirname, 'asset-directory-fixture')),
runtime: lambda.Runtime.NODEJS_10_X,
runtime: lambda.Runtime.NODEJS_14_X,
handler: 'index.handler',
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const lambdaCode = lambda.Code.fromCfnParameters();
new lambda.Function(lambdaStack, 'Lambda', {
code: lambdaCode,
handler: 'index.handler',
runtime: lambda.Runtime.NODEJS_10_X,
runtime: lambda.Runtime.NODEJS_14_X,
});
// other resources that your Lambda needs, added to the lambdaStack...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@
]
},
"Handler": "index.handler",
"Runtime": "nodejs10.x"
"Runtime": "nodejs14.x"
},
"DependsOn": [
"LambdaFunServiceRoleDefaultPolicy217FED83",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const lambdaFun = new lambda.Function(stack, 'LambdaFun', {
};
`),
handler: 'index.handler',
runtime: lambda.Runtime.NODEJS_10_X,
runtime: lambda.Runtime.NODEJS_14_X,
});
const lambdaStage = pipeline.addStage({ stageName: 'Lambda' });
lambdaStage.addAction(new cpactions.LambdaInvokeAction({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
"Code": {
"ZipFile": "exports.handler = (event) => console.log(event);"
},
"Handler": "index.handler",
"Role": {
"Fn::GetAtt": [
"CustomFunctionServiceRoleD3F73B79",
"Arn"
]
},
"Runtime": "nodejs10.x"
"Handler": "index.handler",
"Runtime": "nodejs14.x"
},
"DependsOn": [
"CustomFunctionServiceRoleD3F73B79"
Expand Down Expand Up @@ -224,4 +224,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-config/test/integ.rule.lit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ConfigStack extends cdk.Stack {
const fn = new lambda.Function(this, 'CustomFunction', {
code: lambda.AssetCode.fromInline('exports.handler = (event) => console.log(event);'),
handler: 'index.handler',
runtime: lambda.Runtime.NODEJS_10_X,
runtime: lambda.Runtime.NODEJS_14_X,
});

new config.CustomRule(this, 'Custom', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
"Code": {
"ZipFile": "exports.handler = (event) => console.log(event);"
},
"Handler": "index.handler",
"Role": {
"Fn::GetAtt": [
"CustomFunctionServiceRoleD3F73B79",
"Arn"
]
},
"Runtime": "nodejs10.x"
"Handler": "index.handler",
"Runtime": "nodejs14.x"
},
"DependsOn": [
"CustomFunctionServiceRoleD3F73B79"
Expand Down Expand Up @@ -109,4 +109,4 @@
]
}
}
}
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-config/test/integ.scoped-rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const stack = new cdk.Stack(app, 'aws-cdk-config-rule-scoped-integ');
const fn = new lambda.Function(stack, 'CustomFunction', {
code: lambda.AssetCode.fromInline('exports.handler = (event) => console.log(event);'),
handler: 'index.handler',
runtime: lambda.Runtime.NODEJS_10_X,
runtime: lambda.Runtime.NODEJS_14_X,
});

new config.CustomRule(stack, 'Custom', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
]
},
"Handler": "index.handler",
"Runtime": "nodejs10.x"
"Runtime": "nodejs14.x"
},
"DependsOn": [
"MyFuncServiceRole54065130"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const app = new cdk.App();
const stack = new cdk.Stack(app, 'lambda-events');

const fn = new lambda.Function(stack, 'MyFunc', {
runtime: lambda.Runtime.NODEJS_10_X,
runtime: lambda.Runtime.NODEJS_14_X,
handler: 'index.handler',
code: lambda.Code.fromInline(`exports.handler = ${handler.toString()}`),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
]
},
"Handler": "index.handler",
"Runtime": "nodejs10.x"
"Runtime": "nodejs14.x"
},
"DependsOn": [
"SnsSqsServiceRoleDefaultPolicy82E7B09F",
Expand Down Expand Up @@ -174,7 +174,7 @@
]
},
"Handler": "index.handler",
"Runtime": "nodejs10.x"
"Runtime": "nodejs14.x"
},
"DependsOn": [
"OnSuccesServiceRole75E399CF"
Expand Down Expand Up @@ -290,7 +290,7 @@
]
},
"Handler": "index.handler",
"Runtime": "nodejs10.x"
"Runtime": "nodejs14.x"
},
"DependsOn": [
"EventBusLambdaServiceRoleDefaultPolicy5BB7FEB6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class TestStack extends Stack {
const queue = new sqs.Queue(this, 'Queue');

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

const onSuccessLambda = new lambda.Function(this, 'OnSucces', {
runtime: lambda.Runtime.NODEJS_10_X,
runtime: lambda.Runtime.NODEJS_14_X,
handler: 'index.handler',
code: lambda.Code.fromInline(`exports.handler = async (event) => {
console.log(event);
};`),
});

new lambda.Function(this, 'EventBusLambda', {
runtime: lambda.Runtime.NODEJS_10_X,
runtime: lambda.Runtime.NODEJS_14_X,
handler: 'index.handler',
code: lambda.Code.fromInline(`exports.handler = async (event) => {
if (event === 'OK') return 'success';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
]
},
"Handler": "index.handler",
"Runtime": "nodejs10.x"
"Runtime": "nodejs14.x"
},
"DependsOn": [
"FirstServiceRoleDefaultPolicyB5EF41C4",
Expand Down Expand Up @@ -353,7 +353,7 @@
]
},
"Handler": "index.handler",
"Runtime": "nodejs10.x"
"Runtime": "nodejs14.x"
},
"DependsOn": [
"SecondServiceRoleDefaultPolicyB593E14A",
Expand Down Expand Up @@ -498,7 +498,7 @@
]
},
"Handler": "index.handler",
"Runtime": "nodejs10.x"
"Runtime": "nodejs14.x"
},
"DependsOn": [
"ThirdServiceRole42701801"
Expand Down Expand Up @@ -548,7 +548,7 @@
]
},
"Handler": "index.handler",
"Runtime": "nodejs10.x"
"Runtime": "nodejs14.x"
},
"DependsOn": [
"ErrorServiceRoleCE484966"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TestStack extends Stack {
super(scope, id, props);

const lambdaProps: lambda.FunctionProps = {
runtime: lambda.Runtime.NODEJS_10_X,
runtime: lambda.Runtime.NODEJS_14_X,
handler: 'index.handler',
code: lambda.Code.fromInline(`exports.handler = async (event) => {
console.log('Event: %j', event);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
]
},
"Handler": "index.handler",
"Runtime": "nodejs10.x"
"Runtime": "nodejs14.x"
},
"DependsOn": [
"FServiceRoleDefaultPolicy17A19BFA",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class KinesisWithDLQTest extends Stack {
super(scope, id);

const fn = new lambda.Function(this, 'F', {
runtime: lambda.Runtime.NODEJS_10_X,
runtime: lambda.Runtime.NODEJS_14_X,
handler: 'index.handler',
code: lambda.Code.fromInline(`exports.handler = ${handler.toString()}`),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@
"Code": {
"ZipFile": "exports.handler = async () => {\n return {\n statusCode: '200',\n body: 'hello, world!'\n };\n };"
},
"Handler": "index.handler",
"Role": {
"Fn::GetAtt": [
"HandlerServiceRoleFCDC14AE",
"Arn"
]
},
"Runtime": "nodejs10.x"
"Handler": "index.handler",
"Runtime": "nodejs14.x"
},
"DependsOn": [
"HandlerServiceRoleFCDC14AE"
Expand All @@ -56,33 +56,6 @@
"Name": "api"
}
},
"apiDeployment149F1294891f10d69bae7c4d19bdee7af013a950": {
"Type": "AWS::ApiGateway::Deployment",
"Properties": {
"RestApiId": {
"Ref": "apiC8550315"
},
"Description": "Automatically created by the RestApi construct"
},
"DependsOn": [
"apiproxyANY7F13F09C",
"apiproxy4EA44110",
"apiANYB3DF8C3C"
]
},
"apiDeploymentStageprod896C8101": {
"Type": "AWS::ApiGateway::Stage",
"Properties": {
"RestApiId": {
"Ref": "apiC8550315"
},
"DeploymentId": {
"Ref": "apiDeployment149F1294891f10d69bae7c4d19bdee7af013a950"
},
"StageName": "prod"
},
"DependsOn": ["apiAccount57E28B43"]
},
"apiCloudWatchRoleAC81D93E": {
"Type": "AWS::IAM::Role",
"Properties": {
Expand Down Expand Up @@ -128,6 +101,61 @@
"apiC8550315"
]
},
"apiDeployment149F1294891f10d69bae7c4d19bdee7af013a950": {
"Type": "AWS::ApiGateway::Deployment",
"Properties": {
"RestApiId": {
"Ref": "apiC8550315"
},
"Description": "Automatically created by the RestApi construct"
},
"DependsOn": [
"apiproxyANY7F13F09C",
"apiproxy4EA44110",
"apiANYB3DF8C3C"
]
},
"apiDeploymentStageprod896C8101": {
"Type": "AWS::ApiGateway::Stage",
"Properties": {
"RestApiId": {
"Ref": "apiC8550315"
},
"DeploymentId": {
"Ref": "apiDeployment149F1294891f10d69bae7c4d19bdee7af013a950"
},
"StageName": "prod"
},
"DependsOn": [
"apiAccount57E28B43"
]
},
"apiCustomDomain64773C4F": {
"Type": "AWS::ApiGateway::DomainName",
"Properties": {
"DomainName": "example.com",
"EndpointConfiguration": {
"Types": [
"REGIONAL"
]
},
"RegionalCertificateArn": "arn:aws:acm:us-east-1:111111111111:certificate"
}
},
"apiCustomDomainMapawscdkapigwaliasintegapiF4DF08ACCF365F22": {
"Type": "AWS::ApiGateway::BasePathMapping",
"Properties": {
"DomainName": {
"Ref": "apiCustomDomain64773C4F"
},
"RestApiId": {
"Ref": "apiC8550315"
},
"Stage": {
"Ref": "apiDeploymentStageprod896C8101"
}
}
},
"apiproxy4EA44110": {
"Type": "AWS::ApiGateway::Resource",
"Properties": {
Expand Down Expand Up @@ -382,32 +410,6 @@
}
}
},
"apiCustomDomain64773C4F": {
"Type": "AWS::ApiGateway::DomainName",
"Properties": {
"DomainName": "example.com",
"EndpointConfiguration": {
"Types": [
"REGIONAL"
]
},
"RegionalCertificateArn": "arn:aws:acm:us-east-1:111111111111:certificate"
}
},
"apiCustomDomainMapawscdkapigwaliasintegapiF4DF08ACCF365F22": {
"Type": "AWS::ApiGateway::BasePathMapping",
"Properties": {
"DomainName": {
"Ref": "apiCustomDomain64773C4F"
},
"RestApiId": {
"Ref": "apiC8550315"
},
"Stage": {
"Ref": "apiDeploymentStageprod896C8101"
}
}
},
"Alias325C5727": {
"Type": "AWS::Route53::RecordSet",
"Properties": {
Expand Down
Loading

0 comments on commit 2550589

Please sign in to comment.