Skip to content

Commit

Permalink
Test another example (pulumi#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrusNajmabadi committed Feb 8, 2019
1 parent 6f8b86e commit b1f15d0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 1 addition & 2 deletions aws-js-sqs-slack/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.

let aws = require("@pulumi/aws");
let serverless = require("@pulumi/aws-serverless");
let config = require("./config");

let queue = new aws.sqs.Queue("mySlackQueue", { visibilityTimeoutSeconds: 180 });

serverless.queue.subscribe("mySlackPoster", queue, async (e) => {
queue.onEvent("mySlackPoster", async (e) => {
let slack = require("@slack/client");
let client = new slack.WebClient(config.slackToken);
for (let rec of e.Records) {
Expand Down
1 change: 0 additions & 1 deletion aws-js-sqs-slack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "aws-js-sqs-slack",
"dependencies": {
"@pulumi/aws": "latest",
"@pulumi/aws-serverless": "latest",
"@pulumi/pulumi": "latest",
"@slack/client": "^4.3.1"
}
Expand Down
7 changes: 7 additions & 0 deletions misc/test/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ func TestExamples(t *testing.T) {
"aws:region": awsRegion,
},
}),
quickBase.With(integration.ProgramTestOptions{
Dir: path.Join(cwd, "..", "..", "aws-js-sqs-slack"),
Config: map[string]string{
"aws:region": awsRegion,
"slackToken": "token",
},
}),
}

shortTests := []integration.ProgramTestOptions{
Expand Down

0 comments on commit b1f15d0

Please sign in to comment.