diff --git a/tests/fixtures/arm64.input.service.json b/tests/fixtures/arm64.input.service.json new file mode 100644 index 00000000..d2ffea94 --- /dev/null +++ b/tests/fixtures/arm64.input.service.json @@ -0,0 +1,65 @@ +{ + "service": "newrelic-lambda-layers-nodejs-example", + "provider": { + "name": "aws", + "stage": "prod", + "region": "us-east-1", + "architecture": "arm64", + "stackTags": { + "environment": "us-testing", + "owning_team": "LAMBDA", + "product": "aws-lambda" + }, + "tags": { + "environment": "us-testing", + "owning_team": "LAMBDA", + "product": "aws-lambda" + } + }, + "plugins": [ + "serverless-newrelic-lambda-layers" + ], + "custom": { + "newRelic": { + "accountId": "${env:NEW_RELIC_ACCOUNT_ID}", + "apiKey": "${env:NEW_RELIC_PERSONAL_API_KEY}", + "logLevel": "debug" + } + }, + "functions": { + "layer-nodejs12x": { + "events": [ + { + "schedule": "rate(5 minutes)" + } + ], + "handler": "handler.handler", + "package": { + "exclude": [ + "./**" + ], + "include": [ + "handler.js" + ] + }, + "runtime": "nodejs12.x" + }, + "layer-nodejs14x": { + "events": [ + { + "schedule": "rate(5 minutes)" + } + ], + "handler": "handler.handler", + "package": { + "exclude": [ + "./**" + ], + "include": [ + "handler.js" + ] + }, + "runtime": "nodejs14.x" + } + } +} diff --git a/tests/fixtures/arm64.output.service.json b/tests/fixtures/arm64.output.service.json new file mode 100644 index 00000000..26ee5bf1 --- /dev/null +++ b/tests/fixtures/arm64.output.service.json @@ -0,0 +1,92 @@ +{ + "configValidationMode": "warn", + "custom": { + "newRelic": { + "accountId": "${env:NEW_RELIC_ACCOUNT_ID}", + "apiKey": "${env:NEW_RELIC_PERSONAL_API_KEY}", + "enableExtension": true, + "logLevel": "debug" + } + }, + "disabledDeprecations": [], + "functions": { + "layer-nodejs12x": { + "environment": { + "NEW_RELIC_ACCOUNT_ID": "${env:NEW_RELIC_ACCOUNT_ID}", + "NEW_RELIC_APP_NAME": "layer-nodejs12x", + "NEW_RELIC_LAMBDA_EXTENSION_ENABLED": "true", + "NEW_RELIC_LAMBDA_HANDLER": "handler.handler", + "NEW_RELIC_NO_CONFIG_FILE": "true", + "NEW_RELIC_TRUSTED_ACCOUNT_KEY": "${env:NEW_RELIC_ACCOUNT_ID}" + }, + "events": [ + { + "schedule": "rate(5 minutes)" + } + ], + "handler": "newrelic-lambda-wrapper.handler", + "layers": [ + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS12XARM64:3" + ], + "package": { + "exclude": [ + "./**", + "!newrelic-wrapper-helper.js" + ], + "include": [ + "handler.js" + ] + }, + "runtime": "nodejs12.x" + }, + "layer-nodejs14x": { + "environment": { + "NEW_RELIC_ACCOUNT_ID": "${env:NEW_RELIC_ACCOUNT_ID}", + "NEW_RELIC_APP_NAME": "layer-nodejs14x", + "NEW_RELIC_LAMBDA_EXTENSION_ENABLED": "true", + "NEW_RELIC_LAMBDA_HANDLER": "handler.handler", + "NEW_RELIC_NO_CONFIG_FILE": "true", + "NEW_RELIC_TRUSTED_ACCOUNT_KEY": "${env:NEW_RELIC_ACCOUNT_ID}" + }, + "events": [ + { + "schedule": "rate(5 minutes)" + } + ], + "handler": "newrelic-lambda-wrapper.handler", + "layers": [ + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS14XARM64:2" + ], + "package": { + "exclude": [ + "./**", + "!newrelic-wrapper-helper.js" + ], + "include": [ + "handler.js" + ] + }, + "runtime": "nodejs14.x" + } + }, + "plugins": [ + "serverless-newrelic-lambda-layers" + ], + "provider": { + "architecture": "arm64", + "name": "aws", + "region": "us-east-1", + "stackTags": { + "environment": "us-testing", + "owning_team": "LAMBDA", + "product": "aws-lambda" + }, + "stage": "prod", + "tags": { + "environment": "us-testing", + "owning_team": "LAMBDA", + "product": "aws-lambda" + } + }, + "service": "newrelic-lambda-layers-nodejs-example" +}