Skip to content

Commit 8db36ed

Browse files
authored
chore: remove usage of Node12 runtime in tests (backport #22256) (#22258)
This is an automatic backport of pull request #22256 done by [Mergify](https://mergify.com). Cherry-pick of 40ddfdd has failed: ``` On branch mergify/bp/v1-main/pr-22256 Your branch is up to date with 'origin/v1-main'. You are currently cherry-picking commit 40ddfdd. (fix conflicts and run "git cherry-pick --continue") (use "git cherry-pick --skip" to skip this patch) (use "git cherry-pick --abort" to cancel the cherry-pick operation) Changes to be committed: modified: packages/@aws-cdk/aws-lambda/test/integ.runtime.inlinecode.ts modified: packages/@aws-cdk/aws-lambda/test/runtime.inlinecode.integ.snapshot/aws-cdk-lambda-runtime-inlinecode.template.json Unmerged paths: (use "git add/rm <file>..." as appropriate to mark resolution) deleted by us: packages/@aws-cdk/aws-lambda/test/runtime.inlinecode.integ.snapshot/aws-cdk-lambda-runtime-inlinecode.assets.json both modified: packages/@aws-cdk/aws-lambda/test/runtime.inlinecode.integ.snapshot/manifest.json both modified: packages/@aws-cdk/aws-lambda/test/runtime.inlinecode.integ.snapshot/tree.json ``` To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally --- <details> <summary>Mergify commands and options</summary> <br /> More conditions and actions can be found in the [documentation](https://docs.mergify.com/). You can also trigger Mergify actions by commenting on this pull request: - `@Mergifyio refresh` will re-evaluate the rules - `@Mergifyio rebase` will rebase this PR on its base branch - `@Mergifyio update` will merge the base branch into this PR - `@Mergifyio backport <destination>` will backport this PR on `<destination>` branch Additionally, on Mergify [dashboard](https://dashboard.mergify.com/) you can: - look at your merge queues - generate the Mergify configuration with the config editor. Finally, you can contact us on https://mergify.com </details>
1 parent 0e6013e commit 8db36ed

File tree

5 files changed

+1
-190
lines changed

5 files changed

+1
-190
lines changed

packages/@aws-cdk/aws-lambda/test/integ.runtime.inlinecode.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@ const app = new App();
1515

1616
const stack = new Stack(app, 'aws-cdk-lambda-runtime-inlinecode');
1717

18-
const node12xfn = new Function(stack, 'NODEJS_12_X', {
19-
code: new InlineCode('exports.handler = async function(event) { return "success" }'),
20-
handler: 'index.handler',
21-
runtime: Runtime.NODEJS_12_X,
22-
});
23-
new CfnOutput(stack, 'NODEJS_12_X-functionName', { value: node12xfn.functionName });
24-
2518
const python37 = new Function(stack, 'PYTHON_3_7', {
2619
code: new InlineCode('def handler(event, context):\n return "success"'),
2720
handler: 'index.handler',

packages/@aws-cdk/aws-lambda/test/runtime.inlinecode.integ.snapshot/aws-cdk-lambda-runtime-inlinecode.template.json

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,5 @@
11
{
22
"Resources": {
3-
"NODEJS12XServiceRole59E71436": {
4-
"Type": "AWS::IAM::Role",
5-
"Properties": {
6-
"AssumeRolePolicyDocument": {
7-
"Statement": [
8-
{
9-
"Action": "sts:AssumeRole",
10-
"Effect": "Allow",
11-
"Principal": {
12-
"Service": "lambda.amazonaws.com"
13-
}
14-
}
15-
],
16-
"Version": "2012-10-17"
17-
},
18-
"ManagedPolicyArns": [
19-
{
20-
"Fn::Join": [
21-
"",
22-
[
23-
"arn:",
24-
{
25-
"Ref": "AWS::Partition"
26-
},
27-
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
28-
]
29-
]
30-
}
31-
]
32-
}
33-
},
34-
"NODEJS12X8B8075A4": {
35-
"Type": "AWS::Lambda::Function",
36-
"Properties": {
37-
"Code": {
38-
"ZipFile": "exports.handler = async function(event) { return \"success\" }"
39-
},
40-
"Role": {
41-
"Fn::GetAtt": [
42-
"NODEJS12XServiceRole59E71436",
43-
"Arn"
44-
]
45-
},
46-
"Handler": "index.handler",
47-
"Runtime": "nodejs12.x"
48-
},
49-
"DependsOn": [
50-
"NODEJS12XServiceRole59E71436"
51-
]
52-
},
533
"PYTHON37ServiceRoleDE7E561E": {
544
"Type": "AWS::IAM::Role",
555
"Properties": {
@@ -302,11 +252,6 @@
302252
}
303253
},
304254
"Outputs": {
305-
"NODEJS12XfunctionName": {
306-
"Value": {
307-
"Ref": "NODEJS12X8B8075A4"
308-
}
309-
},
310255
"PYTHON37functionName": {
311256
"Value": {
312257
"Ref": "PYTHON37D3A10E04"

packages/@aws-cdk/aws-lambda/test/runtime.inlinecode.integ.snapshot/integ.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"version": "20.0.0",
33
"testCases": {
4-
"@aws-cdk/aws-lambda/test/integ.runtime.inlinecode": {
4+
"integ.runtime.inlinecode": {
55
"stacks": [
66
"aws-cdk-lambda-runtime-inlinecode"
77
],

packages/@aws-cdk/aws-lambda/test/runtime.inlinecode.integ.snapshot/manifest.json

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,6 @@
1515
"validateOnSynth": false
1616
},
1717
"metadata": {
18-
"/aws-cdk-lambda-runtime-inlinecode/NODEJS_12_X/ServiceRole/Resource": [
19-
{
20-
"type": "aws:cdk:logicalId",
21-
"data": "NODEJS12XServiceRole59E71436"
22-
}
23-
],
24-
"/aws-cdk-lambda-runtime-inlinecode/NODEJS_12_X/Resource": [
25-
{
26-
"type": "aws:cdk:logicalId",
27-
"data": "NODEJS12X8B8075A4"
28-
}
29-
],
30-
"/aws-cdk-lambda-runtime-inlinecode/NODEJS_12_X-functionName": [
31-
{
32-
"type": "aws:cdk:logicalId",
33-
"data": "NODEJS12XfunctionName"
34-
}
35-
],
3618
"/aws-cdk-lambda-runtime-inlinecode/PYTHON_3_7/ServiceRole/Resource": [
3719
{
3820
"type": "aws:cdk:logicalId",
@@ -122,24 +104,6 @@
122104
"type": "aws:cdk:logicalId",
123105
"data": "NODEJS16XfunctionName"
124106
}
125-
],
126-
"PYTHON36ServiceRole814B3AD9": [
127-
{
128-
"type": "aws:cdk:logicalId",
129-
"data": "PYTHON36ServiceRole814B3AD9",
130-
"trace": [
131-
"!!DESTRUCTIVE_CHANGES: WILL_DESTROY"
132-
]
133-
}
134-
],
135-
"PYTHON364935EF15": [
136-
{
137-
"type": "aws:cdk:logicalId",
138-
"data": "PYTHON364935EF15",
139-
"trace": [
140-
"!!DESTRUCTIVE_CHANGES: WILL_DESTROY"
141-
]
142-
}
143107
]
144108
},
145109
"displayName": "aws-cdk-lambda-runtime-inlinecode"

packages/@aws-cdk/aws-lambda/test/runtime.inlinecode.integ.snapshot/tree.json

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -16,97 +16,6 @@
1616
"id": "aws-cdk-lambda-runtime-inlinecode",
1717
"path": "aws-cdk-lambda-runtime-inlinecode",
1818
"children": {
19-
"NODEJS_12_X": {
20-
"id": "NODEJS_12_X",
21-
"path": "aws-cdk-lambda-runtime-inlinecode/NODEJS_12_X",
22-
"children": {
23-
"ServiceRole": {
24-
"id": "ServiceRole",
25-
"path": "aws-cdk-lambda-runtime-inlinecode/NODEJS_12_X/ServiceRole",
26-
"children": {
27-
"Resource": {
28-
"id": "Resource",
29-
"path": "aws-cdk-lambda-runtime-inlinecode/NODEJS_12_X/ServiceRole/Resource",
30-
"attributes": {
31-
"aws:cdk:cloudformation:type": "AWS::IAM::Role",
32-
"aws:cdk:cloudformation:props": {
33-
"assumeRolePolicyDocument": {
34-
"Statement": [
35-
{
36-
"Action": "sts:AssumeRole",
37-
"Effect": "Allow",
38-
"Principal": {
39-
"Service": "lambda.amazonaws.com"
40-
}
41-
}
42-
],
43-
"Version": "2012-10-17"
44-
},
45-
"managedPolicyArns": [
46-
{
47-
"Fn::Join": [
48-
"",
49-
[
50-
"arn:",
51-
{
52-
"Ref": "AWS::Partition"
53-
},
54-
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
55-
]
56-
]
57-
}
58-
]
59-
}
60-
},
61-
"constructInfo": {
62-
"fqn": "@aws-cdk/aws-iam.CfnRole",
63-
"version": "0.0.0"
64-
}
65-
}
66-
},
67-
"constructInfo": {
68-
"fqn": "@aws-cdk/aws-iam.Role",
69-
"version": "0.0.0"
70-
}
71-
},
72-
"Resource": {
73-
"id": "Resource",
74-
"path": "aws-cdk-lambda-runtime-inlinecode/NODEJS_12_X/Resource",
75-
"attributes": {
76-
"aws:cdk:cloudformation:type": "AWS::Lambda::Function",
77-
"aws:cdk:cloudformation:props": {
78-
"code": {
79-
"zipFile": "exports.handler = async function(event) { return \"success\" }"
80-
},
81-
"role": {
82-
"Fn::GetAtt": [
83-
"NODEJS12XServiceRole59E71436",
84-
"Arn"
85-
]
86-
},
87-
"handler": "index.handler",
88-
"runtime": "nodejs12.x"
89-
}
90-
},
91-
"constructInfo": {
92-
"fqn": "@aws-cdk/aws-lambda.CfnFunction",
93-
"version": "0.0.0"
94-
}
95-
}
96-
},
97-
"constructInfo": {
98-
"fqn": "@aws-cdk/aws-lambda.Function",
99-
"version": "0.0.0"
100-
}
101-
},
102-
"NODEJS_12_X-functionName": {
103-
"id": "NODEJS_12_X-functionName",
104-
"path": "aws-cdk-lambda-runtime-inlinecode/NODEJS_12_X-functionName",
105-
"constructInfo": {
106-
"fqn": "@aws-cdk/core.CfnOutput",
107-
"version": "0.0.0"
108-
}
109-
},
11019
"PYTHON_3_7": {
11120
"id": "PYTHON_3_7",
11221
"path": "aws-cdk-lambda-runtime-inlinecode/PYTHON_3_7",

0 commit comments

Comments
 (0)