Skip to content

Commit

Permalink
feat: Adding test fixtures for architecture
Browse files Browse the repository at this point in the history
Signed-off-by: mrickard <[email protected]>
  • Loading branch information
mrickard committed Nov 11, 2021
1 parent 9c92df2 commit 8c8a665
Show file tree
Hide file tree
Showing 2 changed files with 157 additions and 0 deletions.
65 changes: 65 additions & 0 deletions tests/fixtures/arm64.input.service.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
92 changes: 92 additions & 0 deletions tests/fixtures/arm64.output.service.json
Original file line number Diff line number Diff line change
@@ -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"
}

0 comments on commit 8c8a665

Please sign in to comment.