Test another example
MODIFY
aws-js-sqs-slack/index.js
aws-js-sqs-slack/index.js
// 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) {

MODIFY
aws-js-sqs-slack/package.json
aws-js-sqs-slack/package.json
"name": "aws-js-sqs-slack",
"dependencies": {
"@pulumi/aws": "latest",
- "@pulumi/aws-serverless": "latest",
"@pulumi/pulumi": "latest",
"@slack/client": "^4.3.1"
}

MODIFY
misc/test/examples_test.go
misc/test/examples_test.go
@@ -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{

Test another example (#227)