Skip to content

Commit

Permalink
Improve test coverage of AWS JS and Python tests (pulumi#332)
Browse files Browse the repository at this point in the history
Improve test coverage of AWS JS and Python tests
  • Loading branch information
stack72 committed Jun 28, 2019
2 parents 5da4a24 + f1d7e47 commit 5deb1f0
Showing 1 changed file with 28 additions and 24 deletions.
52 changes: 28 additions & 24 deletions misc/test/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,6 @@ func TestExamples(t *testing.T) {
})
},
}),
base.With(integration.ProgramTestOptions{
Dir: path.Join(cwd, "..", "..", "aws-py-s3-folder"),
Config: map[string]string{
"aws:region": awsRegion,
},
ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) {
assertHTTPResult(t, "http:https://"+stack.Outputs["website_url"].(string), func(body string) bool {
return assert.Contains(t, body, "Hello, Pulumi!")
})
},
}),
base.With(integration.ProgramTestOptions{
Dir: path.Join(cwd, "..", "..", "aws-js-s3-folder-component"),
Config: map[string]string{
Expand Down Expand Up @@ -122,6 +111,34 @@ func TestExamples(t *testing.T) {
assertHTTPHelloWorld(t, stack.Outputs["webUrl"])
},
}),
base.With(integration.ProgramTestOptions{
Dir: path.Join(cwd, "..", "..", "aws-py-s3-folder"),
Config: map[string]string{
"aws:region": awsRegion,
},
ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) {
assertHTTPResult(t, "http:https://"+stack.Outputs["website_url"].(string), func(body string) bool {
return assert.Contains(t, body, "Hello, Pulumi!")
})
},
}),
base.With(integration.ProgramTestOptions{
Dir: path.Join(cwd, "..", "..", "aws-py-webserver"),
Config: map[string]string{
"aws:region": awsRegion,
},
ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) {
assertHTTPResult(t, "http:https://"+stack.Outputs["public_dns"].(string), func(body string) bool {
return assert.Contains(t, body, "Hello, World!")
})
},
}),
base.With(integration.ProgramTestOptions{
Dir: path.Join(cwd, "..", "..", "aws-py-stepfunctions"),
Config: map[string]string{
"aws:region": awsRegion,
},
}),
// base.With(integration.ProgramTestOptions{
// Dir: path.Join(cwd, "..", "..", "aws-ts-airflow"),
// Config: map[string]string{
Expand Down Expand Up @@ -382,19 +399,6 @@ func TestExamples(t *testing.T) {
// })
// },
// }),
// TODO[pulumi/pulumi#1606] This test is failing in CI, disabling until this issue is resolved.
// base.With(integration.ProgramTestOptions{
// Dir: path.Join(cwd, "..", "..", "aws-py-webserver"),
// Verbose: true,
// DebugLogLevel: 8,
// DebugUpdates: true,
// Config: map[string]string{
// "aws:region": awsRegion,
// },
// ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) {
// assertHTTPHelloWorld(t, stack.Outputs["public_dns"])
// },
// }),
}

longTests := []integration.ProgramTestOptions{
Expand Down

0 comments on commit 5deb1f0

Please sign in to comment.