Skip to content

Commit

Permalink
Revert "Disable failing container tests (pulumi#264)" (pulumi#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrusNajmabadi committed Mar 30, 2019
1 parent e09625a commit b853d2d
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 53 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ensure:
only_build:

only_test:
go test ./misc/test/... --timeout 2h -v -count=1 -short -parallel 8
go test ./misc/test/... --timeout 2h -v -count=1 -short -parallel 20

# The travis_* targets are entrypoints for CI.
.PHONY: travis_cron travis_push travis_pull_request travis_api
Expand Down
5 changes: 3 additions & 2 deletions aws-ts-apigateway/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as aws from "@pulumi/aws";
import * as awsx from "@pulumi/awsx";

// Create a mapping from 'route' to a count
let counterTable = new aws.dynamodb.Table("counterTable", {
Expand All @@ -12,14 +13,14 @@ let counterTable = new aws.dynamodb.Table("counterTable", {
});

// Create an API endpoint
let endpoint = new aws.apigateway.x.API("hello-world", {
let endpoint = new awsx.apigateway.API("hello-world", {
routes: [{
path: "/{route+}",
method: "GET",
eventHandler: async (event) => {
let route = event.pathParameters["route"];
console.log(`Getting count for '${route}'`);

const client = new aws.sdk.DynamoDB.DocumentClient();

// get previous value and increment
Expand Down
1 change: 1 addition & 0 deletions aws-ts-apigateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.1.0",
"dependencies": {
"@pulumi/aws": "latest",
"@pulumi/awsx": "latest",
"@pulumi/pulumi": "latest"
}
}
83 changes: 33 additions & 50 deletions misc/test/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,19 @@ func TestExamples(t *testing.T) {
}

shortTests := []integration.ProgramTestOptions{
// Test disabled due to flakiness
// https://github.com/pulumi/examples/issues/263
/*
base.With(integration.ProgramTestOptions{
Dir: path.Join(cwd, "..", "..", "aws-js-containers"),
Config: map[string]string{
"aws:region": awsRegion,
},
ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) {
maxWait := 10 * time.Minute
endpoint := stack.Outputs["frontendURL"].(string)
assertHTTPResultWithRetry(t, endpoint, maxWait, func(body string) bool {
return assert.Contains(t, body, "Hello, Pulumi!")
})
},
}),
*/

base.With(integration.ProgramTestOptions{
Dir: path.Join(cwd, "..", "..", "aws-js-containers"),
Config: map[string]string{
"aws:region": awsRegion,
},
ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) {
maxWait := 10 * time.Minute
endpoint := stack.Outputs["frontendURL"].(string)
assertHTTPResultWithRetry(t, endpoint, maxWait, func(body string) bool {
return assert.Contains(t, body, "Hello, Pulumi!")
})
},
}),
base.With(integration.ProgramTestOptions{
Dir: path.Join(cwd, "..", "..", "aws-js-s3-folder"),
Config: map[string]string{
Expand Down Expand Up @@ -137,25 +132,19 @@ func TestExamples(t *testing.T) {
"create-role:unprivilegedUsername": "unpriv",
},
}),

// Test disabled due to flakiness
// https://github.com/pulumi/examples/issues/263
/*
base.With(integration.ProgramTestOptions{
Dir: path.Join(cwd, "..", "..", "aws-ts-containers"),
Config: map[string]string{
"aws:region": awsRegion,
},
ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) {
maxWait := 10 * time.Minute
endpoint := stack.Outputs["frontendURL"].(string)
assertHTTPResultWithRetry(t, endpoint, maxWait, func(body string) bool {
return assert.Contains(t, body, "Hello, Pulumi!")
})
},
}),
*/

base.With(integration.ProgramTestOptions{
Dir: path.Join(cwd, "..", "..", "aws-ts-containers"),
Config: map[string]string{
"aws:region": awsRegion,
},
ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) {
maxWait := 10 * time.Minute
endpoint := stack.Outputs["frontendURL"].(string)
assertHTTPResultWithRetry(t, endpoint, maxWait, func(body string) bool {
return assert.Contains(t, body, "Hello, Pulumi!")
})
},
}),
base.With(integration.ProgramTestOptions{
Dir: path.Join(cwd, "..", "..", "aws-ts-pulumi-webhooks"),
Config: map[string]string{
Expand Down Expand Up @@ -280,19 +269,13 @@ func TestExamples(t *testing.T) {
})
},
}),

// Test disabled due to flakiness
// https://github.com/pulumi/examples/issues/263
/*
base.With(integration.ProgramTestOptions{
Dir: path.Join(cwd, "..", "..", "cloud-js-containers"),
Config: map[string]string{
"aws:region": awsRegion,
"cloud-aws:useFargate": "true",
},
}),
*/

base.With(integration.ProgramTestOptions{
Dir: path.Join(cwd, "..", "..", "cloud-js-containers"),
Config: map[string]string{
"aws:region": awsRegion,
"cloud-aws:useFargate": "true",
},
}),
base.With(integration.ProgramTestOptions{
Dir: path.Join(cwd, "..", "..", "cloud-js-httpserver"),
Config: map[string]string{
Expand Down

0 comments on commit b853d2d

Please sign in to comment.