Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add acceptance test function Adds serverless function that runs built master also fixes some bugs found in doing so
- Loading branch information
Showing
8 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.DS_Store | ||
.serverless | ||
node_modules | ||
coverage | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
spec | ||
acceptance | ||
coverage | ||
src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
var iopipe = require('./iopipe')({ | ||
debug: true | ||
}); | ||
|
||
module.exports.simpleSuccess = iopipe((event, context, callback) => { | ||
iopipe.log('custom_metric', 'A custom metric') | ||
callback(null, { message: 'Successful invocation', event }); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "acceptance-test", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "handler.js", | ||
"scripts": { | ||
"build": "cp ../dist/iopipe.js ./iopipe.js", | ||
"deploy": "serverless deploy", | ||
"invoke": "sls invoke -f simpleSuccess", | ||
"local": "sls invoke local -f simpleSuccess", | ||
"all": "npm run build && npm run local && npm run deploy" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
service: qa-events-agent | ||
|
||
provider: | ||
name: aws | ||
runtime: nodejs6.10 | ||
stage: prod | ||
region: us-west-2 | ||
|
||
functions: | ||
simpleSuccess: | ||
handler: handler.simpleSuccess | ||
environment: | ||
IOPIPE_TOKEN: ${env:IOPIPE_TOKEN} | ||
role: ${env:IAM_ROLE} | ||
events: | ||
- schedule: rate(10 minutes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters