-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
602 additions
and
479 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,7 +1,7 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
module.exports.hello = (event, context, callback) => { | ||
process.stdout.write(event.Records[0].EventSource); | ||
process.stdout.write(event.Records[0].Sns.Message); | ||
callback(null, { message: 'Hello from SNS!', event }); | ||
callback(null, { message: "Hello from SNS!", event }); | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,44 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
const services = require('../helpers/services'); | ||
const services = require("../helpers/services"); | ||
|
||
const LONG_TIMEOUT = 30000; | ||
const AWS = require('aws-sdk'); | ||
const AWS = require("aws-sdk"); | ||
|
||
// Set the region and endpoint in the config for LocalStack | ||
AWS.config.update({ | ||
region: 'us-east-1', | ||
endpoint: 'http://127.0.0.1:4566' | ||
region: "us-east-1", | ||
endpoint: "http://127.0.0.1:4566", | ||
}); | ||
AWS.config.credentials = new AWS.Credentials({ | ||
accessKeyId: 'test', | ||
secretAccessKey: 'test', | ||
accessKeyId: "test", | ||
secretAccessKey: "test", | ||
}); | ||
|
||
const ssm = new AWS.SSM(); | ||
|
||
const params = { | ||
Name: '/dev/lambda/common/LAMBDA_STAGE', | ||
Type: 'String', | ||
Value: 'my-value', | ||
Overwrite: true | ||
Name: "/dev/lambda/common/LAMBDA_STAGE", | ||
Type: "String", | ||
Value: "my-value", | ||
Overwrite: true, | ||
}; | ||
|
||
describe('LocalstackPlugin', () => { | ||
|
||
beforeEach( | ||
async () => { | ||
await ssm.putParameter(params).promise(); | ||
this.service = services.createService({}); | ||
describe("LocalstackPlugin", () => { | ||
beforeEach(async () => { | ||
await ssm.putParameter(params).promise(); | ||
this.service = services.createService({}); | ||
}); | ||
|
||
afterEach( () => { | ||
afterEach(() => { | ||
services.removeService(this.service); | ||
}); | ||
|
||
it('should deploy a stack', () => { | ||
services.deployService(this.service); | ||
}, LONG_TIMEOUT); | ||
|
||
}); | ||
it( | ||
"should deploy a stack", | ||
() => { | ||
services.deployService(this.service); | ||
}, | ||
LONG_TIMEOUT, | ||
); | ||
}); |
Oops, something went wrong.