Skip to content

Commit

Permalink
chore: remove usage of Node12 runtime in tests (backport #22256) (#22258
Browse files Browse the repository at this point in the history
)

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>
  • Loading branch information
mergify[bot] authored Sep 28, 2022
1 parent 0e6013e commit 8db36ed
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 190 deletions.
7 changes: 0 additions & 7 deletions packages/@aws-cdk/aws-lambda/test/integ.runtime.inlinecode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ const app = new App();

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

const node12xfn = new Function(stack, 'NODEJS_12_X', {
code: new InlineCode('exports.handler = async function(event) { return "success" }'),
handler: 'index.handler',
runtime: Runtime.NODEJS_12_X,
});
new CfnOutput(stack, 'NODEJS_12_X-functionName', { value: node12xfn.functionName });

const python37 = new Function(stack, 'PYTHON_3_7', {
code: new InlineCode('def handler(event, context):\n return "success"'),
handler: 'index.handler',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,55 +1,5 @@
{
"Resources": {
"NODEJS12XServiceRole59E71436": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
}
}
],
"Version": "2012-10-17"
},
"ManagedPolicyArns": [
{
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
]
]
}
]
}
},
"NODEJS12X8B8075A4": {
"Type": "AWS::Lambda::Function",
"Properties": {
"Code": {
"ZipFile": "exports.handler = async function(event) { return \"success\" }"
},
"Role": {
"Fn::GetAtt": [
"NODEJS12XServiceRole59E71436",
"Arn"
]
},
"Handler": "index.handler",
"Runtime": "nodejs12.x"
},
"DependsOn": [
"NODEJS12XServiceRole59E71436"
]
},
"PYTHON37ServiceRoleDE7E561E": {
"Type": "AWS::IAM::Role",
"Properties": {
Expand Down Expand Up @@ -302,11 +252,6 @@
}
},
"Outputs": {
"NODEJS12XfunctionName": {
"Value": {
"Ref": "NODEJS12X8B8075A4"
}
},
"PYTHON37functionName": {
"Value": {
"Ref": "PYTHON37D3A10E04"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "20.0.0",
"testCases": {
"@aws-cdk/aws-lambda/test/integ.runtime.inlinecode": {
"integ.runtime.inlinecode": {
"stacks": [
"aws-cdk-lambda-runtime-inlinecode"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,6 @@
"validateOnSynth": false
},
"metadata": {
"/aws-cdk-lambda-runtime-inlinecode/NODEJS_12_X/ServiceRole/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "NODEJS12XServiceRole59E71436"
}
],
"/aws-cdk-lambda-runtime-inlinecode/NODEJS_12_X/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "NODEJS12X8B8075A4"
}
],
"/aws-cdk-lambda-runtime-inlinecode/NODEJS_12_X-functionName": [
{
"type": "aws:cdk:logicalId",
"data": "NODEJS12XfunctionName"
}
],
"/aws-cdk-lambda-runtime-inlinecode/PYTHON_3_7/ServiceRole/Resource": [
{
"type": "aws:cdk:logicalId",
Expand Down Expand Up @@ -122,24 +104,6 @@
"type": "aws:cdk:logicalId",
"data": "NODEJS16XfunctionName"
}
],
"PYTHON36ServiceRole814B3AD9": [
{
"type": "aws:cdk:logicalId",
"data": "PYTHON36ServiceRole814B3AD9",
"trace": [
"!!DESTRUCTIVE_CHANGES: WILL_DESTROY"
]
}
],
"PYTHON364935EF15": [
{
"type": "aws:cdk:logicalId",
"data": "PYTHON364935EF15",
"trace": [
"!!DESTRUCTIVE_CHANGES: WILL_DESTROY"
]
}
]
},
"displayName": "aws-cdk-lambda-runtime-inlinecode"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,97 +16,6 @@
"id": "aws-cdk-lambda-runtime-inlinecode",
"path": "aws-cdk-lambda-runtime-inlinecode",
"children": {
"NODEJS_12_X": {
"id": "NODEJS_12_X",
"path": "aws-cdk-lambda-runtime-inlinecode/NODEJS_12_X",
"children": {
"ServiceRole": {
"id": "ServiceRole",
"path": "aws-cdk-lambda-runtime-inlinecode/NODEJS_12_X/ServiceRole",
"children": {
"Resource": {
"id": "Resource",
"path": "aws-cdk-lambda-runtime-inlinecode/NODEJS_12_X/ServiceRole/Resource",
"attributes": {
"aws:cdk:cloudformation:type": "AWS::IAM::Role",
"aws:cdk:cloudformation:props": {
"assumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
}
}
],
"Version": "2012-10-17"
},
"managedPolicyArns": [
{
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
]
]
}
]
}
},
"constructInfo": {
"fqn": "@aws-cdk/aws-iam.CfnRole",
"version": "0.0.0"
}
}
},
"constructInfo": {
"fqn": "@aws-cdk/aws-iam.Role",
"version": "0.0.0"
}
},
"Resource": {
"id": "Resource",
"path": "aws-cdk-lambda-runtime-inlinecode/NODEJS_12_X/Resource",
"attributes": {
"aws:cdk:cloudformation:type": "AWS::Lambda::Function",
"aws:cdk:cloudformation:props": {
"code": {
"zipFile": "exports.handler = async function(event) { return \"success\" }"
},
"role": {
"Fn::GetAtt": [
"NODEJS12XServiceRole59E71436",
"Arn"
]
},
"handler": "index.handler",
"runtime": "nodejs12.x"
}
},
"constructInfo": {
"fqn": "@aws-cdk/aws-lambda.CfnFunction",
"version": "0.0.0"
}
}
},
"constructInfo": {
"fqn": "@aws-cdk/aws-lambda.Function",
"version": "0.0.0"
}
},
"NODEJS_12_X-functionName": {
"id": "NODEJS_12_X-functionName",
"path": "aws-cdk-lambda-runtime-inlinecode/NODEJS_12_X-functionName",
"constructInfo": {
"fqn": "@aws-cdk/core.CfnOutput",
"version": "0.0.0"
}
},
"PYTHON_3_7": {
"id": "PYTHON_3_7",
"path": "aws-cdk-lambda-runtime-inlinecode/PYTHON_3_7",
Expand Down

0 comments on commit 8db36ed

Please sign in to comment.