From 9ffd194d99604ab048e4eb01062b2fef8c1d09cf Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Wed, 20 Nov 2019 09:43:48 +0100 Subject: [PATCH 1/9] Update docs to reference new runtime --- docs/providers/aws/cli-reference/print.md | 4 ++-- docs/providers/aws/events/apigateway.md | 4 ++-- docs/providers/aws/events/websocket.md | 2 +- docs/providers/aws/guide/credentials.md | 4 ++-- docs/providers/aws/guide/functions.md | 14 +++++++------- docs/providers/aws/guide/serverless.yml.md | 4 ++-- docs/providers/aws/guide/services.md | 6 +++--- docs/providers/aws/guide/variables.md | 4 ++-- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/providers/aws/cli-reference/print.md b/docs/providers/aws/cli-reference/print.md index 376d26bfd..7b1a3ed13 100644 --- a/docs/providers/aws/cli-reference/print.md +++ b/docs/providers/aws/cli-reference/print.md @@ -44,7 +44,7 @@ custom: provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x stage: ${opt:stage, "dev"} functions: @@ -68,7 +68,7 @@ custom: bucketName: test provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x stage: dev # <-- Resolved functions: hello: diff --git a/docs/providers/aws/events/apigateway.md b/docs/providers/aws/events/apigateway.md index d15e2d07b..e1a9f8095 100644 --- a/docs/providers/aws/events/apigateway.md +++ b/docs/providers/aws/events/apigateway.md @@ -1266,7 +1266,7 @@ service: my-api provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x stage: dev region: eu-west-2 @@ -1454,7 +1454,7 @@ Resource policies are policy documents that are used to control the invocation o ```yml provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x resourcePolicy: - Effect: Allow diff --git a/docs/providers/aws/events/websocket.md b/docs/providers/aws/events/websocket.md index b448748d2..bc5aa990a 100644 --- a/docs/providers/aws/events/websocket.md +++ b/docs/providers/aws/events/websocket.md @@ -63,7 +63,7 @@ service: serverless-ws-test provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x websocketsApiName: custom-websockets-api-name websocketsApiRouteSelectionExpression: $request.body.action # custom routes are selected by the value of the action property in the body diff --git a/docs/providers/aws/guide/credentials.md b/docs/providers/aws/guide/credentials.md index 67a888e15..46c5ecbc8 100644 --- a/docs/providers/aws/guide/credentials.md +++ b/docs/providers/aws/guide/credentials.md @@ -149,7 +149,7 @@ You can even set up different profiles for different accounts, which can be used service: new-service provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x stage: dev profile: devProfile ``` @@ -194,7 +194,7 @@ This example `serverless.yml` snippet will load the profile depending upon the s service: new-service provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x stage: ${opt:stage, self:custom.defaultStage} profile: ${self:custom.profiles.${self:provider.stage}} custom: diff --git a/docs/providers/aws/guide/functions.md b/docs/providers/aws/guide/functions.md index dc0153ef0..7b08cc882 100644 --- a/docs/providers/aws/guide/functions.md +++ b/docs/providers/aws/guide/functions.md @@ -26,7 +26,7 @@ service: myService provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x memorySize: 512 # optional, in MB, default is 1024 timeout: 10 # optional, in seconds, default is 6 versionFunctions: false # optional, default is true @@ -61,7 +61,7 @@ service: myService provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x functions: functionOne: @@ -81,7 +81,7 @@ service: myService provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x memorySize: 512 # will be inherited by all functions functions: @@ -97,7 +97,7 @@ service: myService provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x functions: functionOne: @@ -133,7 +133,7 @@ service: myService provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x iamRoleStatements: # permissions for all of your functions can be set here - Effect: Allow Action: # Gives permission to DynamoDB tables in a specific region @@ -390,7 +390,7 @@ service: service provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x functions: hello: @@ -443,7 +443,7 @@ service: myService provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x tracing: lambda: true ``` diff --git a/docs/providers/aws/guide/serverless.yml.md b/docs/providers/aws/guide/serverless.yml.md index 30d2d3993..400756fe2 100644 --- a/docs/providers/aws/guide/serverless.yml.md +++ b/docs/providers/aws/guide/serverless.yml.md @@ -27,7 +27,7 @@ frameworkVersion: '>=1.0.0 <2.0.0' provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x stage: ${opt:stage, 'dev'} # Set the default stage used. Default is dev region: ${opt:region, 'us-east-1'} # Overwrite the default region used. Default is us-east-1 stackName: custom-stack-name # Use a custom name for the CloudFormation stack @@ -164,7 +164,7 @@ functions: description: My function # The description of your function. memorySize: 512 # memorySize for this specific function. reservedConcurrency: 5 # optional, reserved concurrency limit for this function. By default, AWS uses account concurrency limit - runtime: nodejs10.x # Runtime for this specific function. Overrides the default which is set on the provider level + runtime: nodejs12.x # Runtime for this specific function. Overrides the default which is set on the provider level timeout: 10 # Timeout for this specific function. Overrides the default set above. role: arn:aws:iam::XXXXXX:role/role # IAM role which will be used for this function onError: arn:aws:sns:us-east-1:XXXXXX:sns-topic # Optional SNS topic / SQS arn (Ref, Fn::GetAtt and Fn::ImportValue are supported as well) which will be used for the DeadLetterConfig diff --git a/docs/providers/aws/guide/services.md b/docs/providers/aws/guide/services.md index c539493ae..740432bc6 100644 --- a/docs/providers/aws/guide/services.md +++ b/docs/providers/aws/guide/services.md @@ -103,7 +103,7 @@ service: users provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x stage: dev # Set the default stage used. Default is dev region: us-east-1 # Overwrite the default region used. Default is us-east-1 stackName: my-custom-stack-name-${self:provider.stage} # Overwrite default CloudFormation stack name. Default is ${self:service}-${self:provider.stage} @@ -233,7 +233,7 @@ service: users provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x memorySize: 512 … @@ -250,7 +250,7 @@ service: users provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x memorySize: 512 … diff --git a/docs/providers/aws/guide/variables.md b/docs/providers/aws/guide/variables.md index 08078cf12..6b4f21919 100644 --- a/docs/providers/aws/guide/variables.md +++ b/docs/providers/aws/guide/variables.md @@ -196,7 +196,7 @@ You can add such custom output to CloudFormation stack. For example: service: another-service provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x region: ap-northeast-1 memorySize: 512 functions: @@ -621,7 +621,7 @@ service: new-service provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x variableSyntax: "\\${{([ ~:a-zA-Z0-9._@\\'\",\\-\\/\\(\\)]+?)}}" # notice the double quotes for yaml to ignore the escape characters! # variableSyntax: "\\${((?!AWS)[ ~:a-zA-Z0-9._@'\",\\-\\/\\(\\)]+?)}" # Use this for allowing CloudFormation Pseudo-Parameters in your serverless.yml -- e.g. ${AWS::Region}. All other Serverless variables work as usual. From 018574624506a30018661687e84f6cbeb6064124 Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Wed, 20 Nov 2019 09:44:41 +0100 Subject: [PATCH 2/9] Update examples to reference new runtime --- .../create/templates/aws-alexa-typescript/serverless.yml | 2 +- .../create/templates/aws-clojurescript-gradle/serverless.yml | 2 +- .../create/templates/aws-kotlin-nodejs-gradle/serverless.yml | 2 +- .../create/templates/aws-nodejs-ecma-script/serverless.yml | 2 +- .../create/templates/aws-nodejs-typescript/serverless.yml | 2 +- lib/plugins/create/templates/aws-nodejs/serverless.yml | 2 +- lib/plugins/create/templates/azure-nodejs/serverless.yml | 2 +- lib/plugins/create/templates/hello-world/serverless.yml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/plugins/create/templates/aws-alexa-typescript/serverless.yml b/lib/plugins/create/templates/aws-alexa-typescript/serverless.yml index a1c773c82..7b34ad616 100644 --- a/lib/plugins/create/templates/aws-alexa-typescript/serverless.yml +++ b/lib/plugins/create/templates/aws-alexa-typescript/serverless.yml @@ -10,7 +10,7 @@ plugins: provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x custom: alexa: diff --git a/lib/plugins/create/templates/aws-clojurescript-gradle/serverless.yml b/lib/plugins/create/templates/aws-clojurescript-gradle/serverless.yml index fa7edc6bb..19aebf75e 100644 --- a/lib/plugins/create/templates/aws-clojurescript-gradle/serverless.yml +++ b/lib/plugins/create/templates/aws-clojurescript-gradle/serverless.yml @@ -22,7 +22,7 @@ service: aws-clojurescript-gradle provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x # you can overwrite defaults here # stage: dev diff --git a/lib/plugins/create/templates/aws-kotlin-nodejs-gradle/serverless.yml b/lib/plugins/create/templates/aws-kotlin-nodejs-gradle/serverless.yml index 725fb4fe3..070b58919 100644 --- a/lib/plugins/create/templates/aws-kotlin-nodejs-gradle/serverless.yml +++ b/lib/plugins/create/templates/aws-kotlin-nodejs-gradle/serverless.yml @@ -22,7 +22,7 @@ service: aws-kotlin-nodejs-gradle # NOTE: update this with your service name provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x # you can overwrite defaults here # stage: dev diff --git a/lib/plugins/create/templates/aws-nodejs-ecma-script/serverless.yml b/lib/plugins/create/templates/aws-nodejs-ecma-script/serverless.yml index 367db683e..a9c6a2e4a 100644 --- a/lib/plugins/create/templates/aws-nodejs-ecma-script/serverless.yml +++ b/lib/plugins/create/templates/aws-nodejs-ecma-script/serverless.yml @@ -10,7 +10,7 @@ plugins: provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x functions: first: diff --git a/lib/plugins/create/templates/aws-nodejs-typescript/serverless.yml b/lib/plugins/create/templates/aws-nodejs-typescript/serverless.yml index b00954455..9d376b015 100644 --- a/lib/plugins/create/templates/aws-nodejs-typescript/serverless.yml +++ b/lib/plugins/create/templates/aws-nodejs-typescript/serverless.yml @@ -15,7 +15,7 @@ plugins: provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x apiGateway: minimumCompressionSize: 1024 # Enable gzip compression for responses > 1 KB environment: diff --git a/lib/plugins/create/templates/aws-nodejs/serverless.yml b/lib/plugins/create/templates/aws-nodejs/serverless.yml index 48923eb4e..706b59d91 100644 --- a/lib/plugins/create/templates/aws-nodejs/serverless.yml +++ b/lib/plugins/create/templates/aws-nodejs/serverless.yml @@ -22,7 +22,7 @@ service: aws-nodejs # NOTE: update this with your service name provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x # you can overwrite defaults here # stage: dev diff --git a/lib/plugins/create/templates/azure-nodejs/serverless.yml b/lib/plugins/create/templates/azure-nodejs/serverless.yml index 896a65c26..b006071c4 100644 --- a/lib/plugins/create/templates/azure-nodejs/serverless.yml +++ b/lib/plugins/create/templates/azure-nodejs/serverless.yml @@ -20,7 +20,7 @@ service: azure-nodejs # NOTE: update this with your service name provider: name: azure region: West US 2 - runtime: nodejs10.x + runtime: nodejs12.x # prefix: "sample" # prefix of generated resource name # subscriptionId: A356AC8C-E310-44F4-BF85-C7F29044AF99 # stage: dev diff --git a/lib/plugins/create/templates/hello-world/serverless.yml b/lib/plugins/create/templates/hello-world/serverless.yml index a2e0a0fd2..1fbe9e3c1 100644 --- a/lib/plugins/create/templates/hello-world/serverless.yml +++ b/lib/plugins/create/templates/hello-world/serverless.yml @@ -10,7 +10,7 @@ service: serverless-hello-world # The `provider` block defines where your service will be deployed provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x # The `functions` block defines what code to deploy functions: From a541fa78b4bea5a924558a4b3dd0fb67dcd3ac42 Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Wed, 20 Nov 2019 09:44:55 +0100 Subject: [PATCH 3/9] Update integration tests to be run in new runtime --- docs/providers/aws/examples/hello-world/node/serverless.yml | 2 +- tests/integration-all/api-gateway/service/serverless.yml | 2 +- tests/integration-all/cognito-user-pool/service/serverless.yml | 2 +- tests/integration-all/event-bridge/service/serverless.yml | 2 +- tests/integration-all/iot/service/serverless.yml | 2 +- tests/integration-all/s3/service/serverless.yml | 2 +- tests/integration-all/schedule/service/serverless.yml | 2 +- tests/integration-all/sns/service/serverless.yml | 2 +- tests/integration-all/sqs/service/serverless.yml | 2 +- tests/integration-all/stream/service/serverless.yml | 2 +- tests/integration-all/websocket/service/serverless.yml | 2 +- tests/integration-package/fixtures/artifact/serverless.yml | 2 +- .../fixtures/individually-function/serverless.yml | 2 +- tests/integration-package/fixtures/individually/serverless.yml | 2 +- tests/integration-package/fixtures/regular/serverless.yml | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/providers/aws/examples/hello-world/node/serverless.yml b/docs/providers/aws/examples/hello-world/node/serverless.yml index 4d44fe7c3..909cabc93 100644 --- a/docs/providers/aws/examples/hello-world/node/serverless.yml +++ b/docs/providers/aws/examples/hello-world/node/serverless.yml @@ -3,7 +3,7 @@ service: hello-world # Service Name provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x functions: helloWorld: diff --git a/tests/integration-all/api-gateway/service/serverless.yml b/tests/integration-all/api-gateway/service/serverless.yml index d3a5d6a33..bb4b13a72 100644 --- a/tests/integration-all/api-gateway/service/serverless.yml +++ b/tests/integration-all/api-gateway/service/serverless.yml @@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x versionFunctions: false apiKeys: - name: CHANGE_TO_UNIQUE_PER_RUN diff --git a/tests/integration-all/cognito-user-pool/service/serverless.yml b/tests/integration-all/cognito-user-pool/service/serverless.yml index 1f10c0d8b..ab8235398 100644 --- a/tests/integration-all/cognito-user-pool/service/serverless.yml +++ b/tests/integration-all/cognito-user-pool/service/serverless.yml @@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x versionFunctions: false functions: diff --git a/tests/integration-all/event-bridge/service/serverless.yml b/tests/integration-all/event-bridge/service/serverless.yml index 1322d76c2..14c8463c8 100644 --- a/tests/integration-all/event-bridge/service/serverless.yml +++ b/tests/integration-all/event-bridge/service/serverless.yml @@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x versionFunctions: false functions: diff --git a/tests/integration-all/iot/service/serverless.yml b/tests/integration-all/iot/service/serverless.yml index e3ef807fd..60b870eb5 100644 --- a/tests/integration-all/iot/service/serverless.yml +++ b/tests/integration-all/iot/service/serverless.yml @@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x versionFunctions: false functions: diff --git a/tests/integration-all/s3/service/serverless.yml b/tests/integration-all/s3/service/serverless.yml index 39ef43078..6105414ca 100644 --- a/tests/integration-all/s3/service/serverless.yml +++ b/tests/integration-all/s3/service/serverless.yml @@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x versionFunctions: false functions: diff --git a/tests/integration-all/schedule/service/serverless.yml b/tests/integration-all/schedule/service/serverless.yml index 7f4bb9ff8..46b7592de 100644 --- a/tests/integration-all/schedule/service/serverless.yml +++ b/tests/integration-all/schedule/service/serverless.yml @@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x versionFunctions: false functions: diff --git a/tests/integration-all/sns/service/serverless.yml b/tests/integration-all/sns/service/serverless.yml index 4385537e8..0687fb8a7 100644 --- a/tests/integration-all/sns/service/serverless.yml +++ b/tests/integration-all/sns/service/serverless.yml @@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x versionFunctions: false functions: diff --git a/tests/integration-all/sqs/service/serverless.yml b/tests/integration-all/sqs/service/serverless.yml index 220d33d9f..2ba491509 100644 --- a/tests/integration-all/sqs/service/serverless.yml +++ b/tests/integration-all/sqs/service/serverless.yml @@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x versionFunctions: false functions: diff --git a/tests/integration-all/stream/service/serverless.yml b/tests/integration-all/stream/service/serverless.yml index 9b43b4a2f..1d455cab1 100644 --- a/tests/integration-all/stream/service/serverless.yml +++ b/tests/integration-all/stream/service/serverless.yml @@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x versionFunctions: false functions: diff --git a/tests/integration-all/websocket/service/serverless.yml b/tests/integration-all/websocket/service/serverless.yml index 596eb6826..7ed31074b 100644 --- a/tests/integration-all/websocket/service/serverless.yml +++ b/tests/integration-all/websocket/service/serverless.yml @@ -2,7 +2,7 @@ service: CHANGE_TO_UNIQUE_PER_RUN provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x versionFunctions: false logs: websocket: true diff --git a/tests/integration-package/fixtures/artifact/serverless.yml b/tests/integration-package/fixtures/artifact/serverless.yml index e5668f229..0ac9fd5af 100644 --- a/tests/integration-package/fixtures/artifact/serverless.yml +++ b/tests/integration-package/fixtures/artifact/serverless.yml @@ -2,7 +2,7 @@ service: aws-nodejs provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x functions: hello: diff --git a/tests/integration-package/fixtures/individually-function/serverless.yml b/tests/integration-package/fixtures/individually-function/serverless.yml index d9994bbd5..a883a413c 100644 --- a/tests/integration-package/fixtures/individually-function/serverless.yml +++ b/tests/integration-package/fixtures/individually-function/serverless.yml @@ -2,7 +2,7 @@ service: aws-nodejs provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x functions: hello: diff --git a/tests/integration-package/fixtures/individually/serverless.yml b/tests/integration-package/fixtures/individually/serverless.yml index df2d79d23..b273f4882 100644 --- a/tests/integration-package/fixtures/individually/serverless.yml +++ b/tests/integration-package/fixtures/individually/serverless.yml @@ -2,7 +2,7 @@ service: aws-nodejs provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x package: individually: true diff --git a/tests/integration-package/fixtures/regular/serverless.yml b/tests/integration-package/fixtures/regular/serverless.yml index b9cffde35..9239c2b6b 100644 --- a/tests/integration-package/fixtures/regular/serverless.yml +++ b/tests/integration-package/fixtures/regular/serverless.yml @@ -2,7 +2,7 @@ service: aws-nodejs provider: name: aws - runtime: nodejs10.x + runtime: nodejs12.x functions: hello: From 71699d9a4775ece5b8ba10141531954f72fc56d1 Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Wed, 20 Nov 2019 09:48:32 +0100 Subject: [PATCH 4/9] Default to nodejs12.x runtime --- lib/plugins/aws/invokeLocal/index.js | 2 +- lib/plugins/aws/package/compile/functions/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plugins/aws/invokeLocal/index.js b/lib/plugins/aws/invokeLocal/index.js index 6c6627585..7f7d382f3 100644 --- a/lib/plugins/aws/invokeLocal/index.js +++ b/lib/plugins/aws/invokeLocal/index.js @@ -37,7 +37,7 @@ class AwsInvokeLocal { getRuntime() { return ( - this.options.functionObj.runtime || this.serverless.service.provider.runtime || 'nodejs10.x' + this.options.functionObj.runtime || this.serverless.service.provider.runtime || 'nodejs12.x' ); } diff --git a/lib/plugins/aws/package/compile/functions/index.js b/lib/plugins/aws/package/compile/functions/index.js index ee38dc221..647234abf 100644 --- a/lib/plugins/aws/package/compile/functions/index.js +++ b/lib/plugins/aws/package/compile/functions/index.js @@ -170,7 +170,7 @@ class AwsCompileFunctions { const Timeout = Number(functionObject.timeout) || Number(this.serverless.service.provider.timeout) || 6; const Runtime = - functionObject.runtime || this.serverless.service.provider.runtime || 'nodejs10.x'; + functionObject.runtime || this.serverless.service.provider.runtime || 'nodejs12.x'; newFunction.Properties.Handler = Handler; newFunction.Properties.FunctionName = FunctionName; From 81c22f43a4aaa540a90483114cd8eeda2acc6c2b Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Wed, 20 Nov 2019 09:49:01 +0100 Subject: [PATCH 5/9] Update integration package tests with new runtine --- tests/integration-package/cloudformation.tests.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration-package/cloudformation.tests.js b/tests/integration-package/cloudformation.tests.js index 0adc13fdc..66b443c53 100644 --- a/tests/integration-package/cloudformation.tests.js +++ b/tests/integration-package/cloudformation.tests.js @@ -44,7 +44,7 @@ describe('Integration test - Packaging', () => { Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'], }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, }, DependsOn: ['HelloLogGroup', 'IamRoleLambdaExecution'], @@ -75,7 +75,7 @@ describe('Integration test - Packaging', () => { Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'], }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, }, DependsOn: ['HelloLogGroup', 'IamRoleLambdaExecution'], @@ -109,7 +109,7 @@ describe('Integration test - Packaging', () => { Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'], }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, }, DependsOn: ['HelloLogGroup', 'IamRoleLambdaExecution'], From 8148cfc6ccbaa3e7c8ed9b34e43056b83461c4a4 Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Wed, 20 Nov 2019 09:50:34 +0100 Subject: [PATCH 6/9] Rely on new runtime in custom resource lambdas --- lib/plugins/aws/customResources/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/aws/customResources/index.js b/lib/plugins/aws/customResources/index.js index 3b84d4663..b97b5cc1d 100644 --- a/lib/plugins/aws/customResources/index.js +++ b/lib/plugins/aws/customResources/index.js @@ -174,7 +174,7 @@ function addCustomResourceToService(awsProvider, resourceName, iamRoleStatements FunctionName: absoluteFunctionName, Handler, MemorySize: 1024, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 180, }, DependsOn: [], From d66e457572628f9a34da553d78b123ec98ad59de Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Wed, 20 Nov 2019 11:11:20 +0100 Subject: [PATCH 7/9] Ensure to update tests with a new runtime --- lib/classes/Service.test.js | 4 +- lib/classes/Utils.test.js | 2 +- lib/plugins/aws/customResources/index.test.js | 12 ++-- lib/plugins/aws/invokeLocal/index.test.js | 12 ++-- .../package/compile/functions/index.test.js | 64 +++++++++---------- .../aws/package/compile/layers/index.test.js | 4 +- 6 files changed, 49 insertions(+), 49 deletions(-) diff --git a/lib/classes/Service.test.js b/lib/classes/Service.test.js index 3b0b398d1..88bf11f43 100644 --- a/lib/classes/Service.test.js +++ b/lib/classes/Service.test.js @@ -97,14 +97,14 @@ describe('Service', () => { const data = { provider: { name: 'testProvider', - runtime: 'nodejs10.x', + runtime: 'nodejs12.x', }, }; const serviceInstance = new Service(serverless, data); expect(serviceInstance.provider.name).to.be.equal('testProvider'); - expect(serviceInstance.provider.runtime).to.be.equal('nodejs10.x'); + expect(serviceInstance.provider.runtime).to.be.equal('nodejs12.x'); }); }); diff --git a/lib/classes/Utils.test.js b/lib/classes/Utils.test.js index 43ab87ed3..26cc7f109 100644 --- a/lib/classes/Utils.test.js +++ b/lib/classes/Utils.test.js @@ -747,7 +747,7 @@ describe('Utils', () => { service: 'new-service', provider: { name: 'aws', - runtime: 'nodejs10.x', + runtime: 'nodejs12.x', stage: 'dev', region: 'us-east-1', variableSyntax: '\\${foo}', diff --git a/lib/plugins/aws/customResources/index.test.js b/lib/plugins/aws/customResources/index.test.js index 639f25cd8..5ecfffd40 100644 --- a/lib/plugins/aws/customResources/index.test.js +++ b/lib/plugins/aws/customResources/index.test.js @@ -125,7 +125,7 @@ describe('#addCustomResourceToService()', () => { Role: { 'Fn::GetAtt': ['IamRoleCustomResourcesLambdaExecution', 'Arn'], }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 180, }, DependsOn: ['IamRoleCustomResourcesLambdaExecution'], @@ -144,7 +144,7 @@ describe('#addCustomResourceToService()', () => { Role: { 'Fn::GetAtt': ['IamRoleCustomResourcesLambdaExecution', 'Arn'], }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 180, }, DependsOn: ['IamRoleCustomResourcesLambdaExecution'], @@ -163,7 +163,7 @@ describe('#addCustomResourceToService()', () => { Role: { 'Fn::GetAtt': ['IamRoleCustomResourcesLambdaExecution', 'Arn'], }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 180, }, DependsOn: ['IamRoleCustomResourcesLambdaExecution'], @@ -290,7 +290,7 @@ describe('#addCustomResourceToService()', () => { Handler: 's3/handler.handler', MemorySize: 1024, Role: cfnRoleArn, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 180, }, DependsOn: [], @@ -307,7 +307,7 @@ describe('#addCustomResourceToService()', () => { Handler: 'cognitoUserPool/handler.handler', MemorySize: 1024, Role: cfnRoleArn, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 180, }, DependsOn: [], @@ -324,7 +324,7 @@ describe('#addCustomResourceToService()', () => { Handler: 'eventBridge/handler.handler', MemorySize: 1024, Role: cfnRoleArn, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 180, }, DependsOn: [], diff --git a/lib/plugins/aws/invokeLocal/index.test.js b/lib/plugins/aws/invokeLocal/index.test.js index c227d3040..afab56b50 100644 --- a/lib/plugins/aws/invokeLocal/index.test.js +++ b/lib/plugins/aws/invokeLocal/index.test.js @@ -400,7 +400,7 @@ describe('AwsInvokeLocal', () => { })); it('should call invokeLocalNodeJs for any node.js runtime version', () => { - awsInvokeLocal.options.functionObj.runtime = 'nodejs10.x'; + awsInvokeLocal.options.functionObj.runtime = 'nodejs12.x'; return awsInvokeLocal.invokeLocal().then(() => { expect(invokeLocalNodeJsStub.calledOnce).to.be.equal(true); expect( @@ -488,8 +488,8 @@ describe('AwsInvokeLocal', () => { }); }); - it('should call invokeLocalDocker if using --docker option with nodejs10.x', () => { - awsInvokeLocal.options.functionObj.runtime = 'nodejs10.x'; + it('should call invokeLocalDocker if using --docker option with nodejs12.x', () => { + awsInvokeLocal.options.functionObj.runtime = 'nodejs12.x'; awsInvokeLocal.options.functionObj.handler = 'handler.foobar'; awsInvokeLocal.options.docker = true; return awsInvokeLocal.invokeLocal().then(() => { @@ -1186,7 +1186,7 @@ describe('AwsInvokeLocal', () => { handler: 'handler.hello', name: 'hello', timeout: 4, - runtime: 'nodejs10.x', + runtime: 'nodejs12.x', environment: { functionVar: 'functionValue', }, @@ -1215,11 +1215,11 @@ describe('AwsInvokeLocal', () => { expect(spawnStub.getCall(0).args).to.deep.equal(['docker', ['version']]); expect(spawnStub.getCall(1).args).to.deep.equal([ 'docker', - ['images', '-q', 'lambci/lambda:nodejs10.x'], + ['images', '-q', 'lambci/lambda:nodejs12.x'], ]); expect(spawnStub.getCall(2).args).to.deep.equal([ 'docker', - ['pull', 'lambci/lambda:nodejs10.x'], + ['pull', 'lambci/lambda:nodejs12.x'], ]); expect(spawnStub.getCall(3).args).to.deep.equal([ 'docker', diff --git a/lib/plugins/aws/package/compile/functions/index.test.js b/lib/plugins/aws/package/compile/functions/index.test.js index 8b18edaa4..a46712bb1 100644 --- a/lib/plugins/aws/package/compile/functions/index.test.js +++ b/lib/plugins/aws/package/compile/functions/index.test.js @@ -513,7 +513,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, }, }; @@ -554,7 +554,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, VpcConfig: { SecurityGroupIds: ['xxx'], @@ -598,7 +598,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, VpcConfig: { SecurityGroupIds: ['xxx'], @@ -644,7 +644,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, Tags: [{ Key: 'foo', Value: 'bar' }, { Key: 'baz', Value: 'qux' }], }, @@ -686,7 +686,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, Tags: [{ Key: 'foo', Value: 'bar' }, { Key: 'baz', Value: 'qux' }], }, @@ -733,7 +733,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, Tags: [ { Key: 'foo', Value: 'bar' }, @@ -835,7 +835,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, DeadLetterConfig: { TargetArn: 'arn:aws:sns:region:accountid:foo', @@ -900,7 +900,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, DeadLetterConfig: { TargetArn: { @@ -942,7 +942,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, DeadLetterConfig: { TargetArn: { @@ -984,7 +984,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, DeadLetterConfig: { TargetArn: { @@ -1026,7 +1026,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, DeadLetterConfig: { TargetArn: 'arn:aws:sns:region:accountid:foo', @@ -1136,7 +1136,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, KmsKeyArn: 'arn:aws:kms:region:accountid:foo/bar', }, @@ -1180,7 +1180,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func1.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, KmsKeyArn: 'arn:aws:kms:region:accountid:foo/function', }, @@ -1198,7 +1198,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func2.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, KmsKeyArn: 'arn:aws:kms:region:accountid:foo/service', }, @@ -1252,7 +1252,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, KmsKeyArn: 'arn:aws:kms:region:accountid:foo/bar', }, @@ -1301,7 +1301,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, KmsKeyArn: 'arn:aws:kms:region:accountid:foo/bar', }, @@ -1366,7 +1366,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, TracingConfig: { Mode: 'Active', @@ -1413,7 +1413,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func1.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, TracingConfig: { Mode: 'Active', @@ -1433,7 +1433,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func2.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, TracingConfig: { Mode: 'PassThrough', @@ -1489,7 +1489,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, TracingConfig: { Mode: 'Active', @@ -1540,7 +1540,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, TracingConfig: { Mode: 'PassThrough', @@ -1592,7 +1592,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, Environment: { Variables: { @@ -1639,7 +1639,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, Environment: { Variables: { @@ -1685,7 +1685,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, Environment: { Variables: { @@ -1734,7 +1734,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, Environment: { Variables: { @@ -1843,7 +1843,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 128, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 10, }, }; @@ -1898,7 +1898,7 @@ describe('AwsCompileFunctions', () => { } ); - it('should default to the nodejs10.x runtime when no provider runtime is given', () => { + it('should default to the nodejs12.x runtime when no provider runtime is given', () => { const s3Folder = awsCompileFunctions.serverless.service.package.artifactDirectoryName; const s3FileName = awsCompileFunctions.serverless.service.package.artifact .split(path.sep) @@ -1922,7 +1922,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, }, }; @@ -2181,7 +2181,7 @@ describe('AwsCompileFunctions', () => { MemorySize: 1024, ReservedConcurrentExecutions: 5, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, }, }; @@ -2219,7 +2219,7 @@ describe('AwsCompileFunctions', () => { MemorySize: 1024, ReservedConcurrentExecutions: 0, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, }, }; @@ -2395,7 +2395,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, }, }; @@ -2433,7 +2433,7 @@ describe('AwsCompileFunctions', () => { Handler: 'func.function.handler', MemorySize: 1024, Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, - Runtime: 'nodejs10.x', + Runtime: 'nodejs12.x', Timeout: 6, Layers: ['arn:aws:xxx:*:*'], }, diff --git a/lib/plugins/aws/package/compile/layers/index.test.js b/lib/plugins/aws/package/compile/layers/index.test.js index 9d9e9e032..f73a13c0f 100644 --- a/lib/plugins/aws/package/compile/layers/index.test.js +++ b/lib/plugins/aws/package/compile/layers/index.test.js @@ -374,7 +374,7 @@ describe('AwsCompileLayers', () => { test: { path: 'layer', description: 'desc', - compatibleRuntimes: ['nodejs10.x'], + compatibleRuntimes: ['nodejs12.x'], licenseInfo: 'GPL', }, }; @@ -387,7 +387,7 @@ describe('AwsCompileLayers', () => { }, LayerName: 'test', Description: 'desc', - CompatibleRuntimes: ['nodejs10.x'], + CompatibleRuntimes: ['nodejs12.x'], LicenseInfo: 'GPL', }, }; From cb5c4a57b3e506f8e61679bd3a8d822af037cd7c Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Wed, 20 Nov 2019 12:04:45 +0100 Subject: [PATCH 8/9] Prettify --- .../aws/package/compile/functions/index.test.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/plugins/aws/package/compile/functions/index.test.js b/lib/plugins/aws/package/compile/functions/index.test.js index a46712bb1..0ef694abd 100644 --- a/lib/plugins/aws/package/compile/functions/index.test.js +++ b/lib/plugins/aws/package/compile/functions/index.test.js @@ -646,7 +646,10 @@ describe('AwsCompileFunctions', () => { Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, Runtime: 'nodejs12.x', Timeout: 6, - Tags: [{ Key: 'foo', Value: 'bar' }, { Key: 'baz', Value: 'qux' }], + Tags: [ + { Key: 'foo', Value: 'bar' }, + { Key: 'baz', Value: 'qux' }, + ], }, }; @@ -688,7 +691,10 @@ describe('AwsCompileFunctions', () => { Role: { 'Fn::GetAtt': ['IamRoleLambdaExecution', 'Arn'] }, Runtime: 'nodejs12.x', Timeout: 6, - Tags: [{ Key: 'foo', Value: 'bar' }, { Key: 'baz', Value: 'qux' }], + Tags: [ + { Key: 'foo', Value: 'bar' }, + { Key: 'baz', Value: 'qux' }, + ], }, }; From f9a79b3742bc744c60c9471d029f1e23248fecd4 Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Wed, 20 Nov 2019 12:10:15 +0100 Subject: [PATCH 9/9] Update up to recent changes --- .../aws/package/compile/functions/index.test.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/plugins/aws/package/compile/functions/index.test.js b/lib/plugins/aws/package/compile/functions/index.test.js index 0ef694abd..ce4e6f8ff 100644 --- a/lib/plugins/aws/package/compile/functions/index.test.js +++ b/lib/plugins/aws/package/compile/functions/index.test.js @@ -2053,12 +2053,12 @@ describe('AwsCompileFunctions', () => { const expectedOutputs = { FuncLambdaFunctionQualifiedArn: { Description: 'Current Lambda function version', - Value: { Ref: 'FuncLambdaVersionpcyXz9PqN5xesfBZOOhY7t6jhi8kOCyGDknpfuhJ4' }, + Value: { Ref: 'FuncLambdaVersionRk2uCHjn9BWyD0yH8GzU5kTmGVjCc6ZZx46sUUI1LQ' }, }, AnotherFuncLambdaFunctionQualifiedArn: { Description: 'Current Lambda function version', Value: { - Ref: 'AnotherFuncLambdaVersionIo6IWr3BPLeAaVjlRwEGEz4vvDzC43h07eOBY0fXyI', + Ref: 'AnotherFuncLambdaVersionha2TZXucQgvNN4zjzNnEFIaTGAQxdp7jICMvFkl0', }, }, }; @@ -2083,12 +2083,12 @@ describe('AwsCompileFunctions', () => { const expectedOutputs = { FuncLambdaFunctionQualifiedArn: { Description: 'Current Lambda function version', - Value: { Ref: 'FuncLambdaVersionpcyXz9PqN5xesfBZOOhY7t6jhi8kOCyGDknpfuhJ4' }, + Value: { Ref: 'FuncLambdaVersionRk2uCHjn9BWyD0yH8GzU5kTmGVjCc6ZZx46sUUI1LQ' }, }, AnotherFuncLambdaFunctionQualifiedArn: { Description: 'Current Lambda function version', Value: { - Ref: 'AnotherFuncLambdaVersionIo6IWr3BPLeAaVjlRwEGEz4vvDzC43h07eOBY0fXyI', + Ref: 'AnotherFuncLambdaVersionha2TZXucQgvNN4zjzNnEFIaTGAQxdp7jICMvFkl0', }, }, }; @@ -2117,7 +2117,7 @@ describe('AwsCompileFunctions', () => { // Expect different version hash _.set(expectedOutputs, 'FuncLambdaFunctionQualifiedArn', { Description: 'Current Lambda function version', - Value: { Ref: 'FuncLambdaVersionI1xWetHMVQO8bvzGqgmokPl25rtJA0A8g6lZNYdkdg' }, + Value: { Ref: 'FuncLambdaVersionYqfesG4U7X9KW8rtI9WywGLkurgescFGCy7rnMy8o' }, }); expect( @@ -2137,7 +2137,7 @@ describe('AwsCompileFunctions', () => { return expect(awsCompileFunctions.compileFunctions()).to.be.fulfilled.then(() => { expect( awsCompileFunctions.serverless.service.provider.compiledCloudFormationTemplate.Resources - .FuncLambdaVersionBzAYHivcbYLoEZcl7hN9cBrakBNygN0PiUC9UjQVMA.Properties.Description + .FuncLambdaVersionUF9qY6un3qUVhv62q1QPfZm4qaYxyEJXKjFTLIZ5Ig.Properties.Description ).to.equal('Lambda function description'); }); }); @@ -2274,7 +2274,7 @@ describe('AwsCompileFunctions', () => { const expectedOutputs = { FuncLambdaFunctionQualifiedArn: { Description: 'Current Lambda function version', - Value: { Ref: 'FuncLambdaVersionpcyXz9PqN5xesfBZOOhY7t6jhi8kOCyGDknpfuhJ4' }, + Value: { Ref: 'FuncLambdaVersionRk2uCHjn9BWyD0yH8GzU5kTmGVjCc6ZZx46sUUI1LQ' }, }, };