Skip to content

Commit 661a018

Browse files
Eugene Cheungmergify[bot]
andauthored
chore: use non-deprecated Lambda runtime in unit tests [skip ci] (#408)
No tangible difference, just addresses deprecation warnings. --- _By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license_ Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent ab22198 commit 661a018

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
lines changed

test/dashboard/widget/CustomWidget.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ test("widget", () => {
88

99
const handler = new Function(stack, "Function", {
1010
// execution environment
11-
runtime: Runtime.NODEJS_12_X,
11+
runtime: Runtime.NODEJS_18_X,
1212
// code loaded from "lambda" directory
1313
code: Code.fromInline(
1414
'exports.handler = function(event, ctx, cb) { return cb(null, "Hello World!"); }'

test/facade/MonitoringAspect.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ describe("MonitoringAspect", () => {
391391
new lambda.Function(stack, "DummyFunction", {
392392
code: lambda.Code.fromInline("lambda"),
393393
handler: "index.handler",
394-
runtime: lambda.Runtime.NODEJS_12_X,
394+
runtime: lambda.Runtime.NODEJS_18_X,
395395
});
396396

397397
// WHEN

test/facade/__snapshots__/MonitoringAspect.test.ts.snap

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/monitoring/aws-lambda/LambdaFunctionMonitoring.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ test("snapshot test: no alarms", () => {
1919

2020
const lambdaFunction = new Function(stack, "Function", {
2121
functionName: "DummyLambda",
22-
runtime: Runtime.NODEJS_12_X,
22+
runtime: Runtime.NODEJS_18_X,
2323
code: InlineCode.fromInline("{}"),
2424
handler: "Dummy::handler",
2525
});
@@ -49,7 +49,7 @@ test("snapshot test: all alarms", () => {
4949

5050
const lambdaFunction = new Function(stack, "Function", {
5151
functionName: "DummyLambda",
52-
runtime: Runtime.NODEJS_12_X,
52+
runtime: Runtime.NODEJS_18_X,
5353
code: InlineCode.fromInline("{}"),
5454
handler: "Dummy::handler",
5555
});
@@ -156,7 +156,7 @@ test("snapshot test: all alarms", () => {
156156

157157
const lambdaFunction = new Function(stack, "Function", {
158158
functionName: "DummyLambda",
159-
runtime: Runtime.NODEJS_12_X,
159+
runtime: Runtime.NODEJS_18_X,
160160
code: InlineCode.fromInline("{}"),
161161
handler: "Dummy::handler",
162162
layers: [
@@ -196,7 +196,7 @@ test("snapshot test: all alarms, alarmPrefix on error dedupeString", () => {
196196

197197
const lambdaFunction = new Function(stack, "Function", {
198198
functionName: "DummyLambda",
199-
runtime: Runtime.NODEJS_12_X,
199+
runtime: Runtime.NODEJS_18_X,
200200
code: InlineCode.fromInline("{}"),
201201
handler: "Dummy::handler",
202202
});
@@ -334,7 +334,7 @@ test("snapshot test: all alarms, alarmPrefix on latency dedupeString", () => {
334334

335335
const lambdaFunction = new Function(stack, "Function", {
336336
functionName: "DummyLambda",
337-
runtime: Runtime.NODEJS_12_X,
337+
runtime: Runtime.NODEJS_18_X,
338338
code: InlineCode.fromInline("{}"),
339339
handler: "Dummy::handler",
340340
});
@@ -472,7 +472,7 @@ test("doesn't create alarms for enhanced Lambda Insights metrics if not enabled"
472472

473473
const lambdaFunction = new Function(stack, "Function", {
474474
functionName: "DummyLambda",
475-
runtime: Runtime.NODEJS_12_X,
475+
runtime: Runtime.NODEJS_18_X,
476476
code: InlineCode.fromInline("{}"),
477477
handler: "Dummy::handler",
478478
});

test/monitoring/aws-lambda/__snapshots__/LambdaFunctionMonitoring.test.ts.snap

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/monitoring/aws-step-functions/StepFunctionLambdaIntegrationMonitoring.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ test("snapshot test: no alarms", () => {
1616

1717
const lambdaFunction = new Function(stack, "Function", {
1818
functionName: "DummyLambda",
19-
runtime: Runtime.NODEJS_12_X,
19+
runtime: Runtime.NODEJS_18_X,
2020
code: InlineCode.fromInline("{}"),
2121
handler: "Dummy::handler",
2222
});
@@ -37,7 +37,7 @@ test("snapshot test: all alarms", () => {
3737

3838
const lambdaFunction = new Function(stack, "Function", {
3939
functionName: "DummyLambda",
40-
runtime: Runtime.NODEJS_12_X,
40+
runtime: Runtime.NODEJS_18_X,
4141
code: InlineCode.fromInline("{}"),
4242
handler: "Dummy::handler",
4343
});

test/monitoring/aws-step-functions/__snapshots__/StepFunctionLambdaIntegrationMonitoring.test.ts.snap

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)