From f1d7e47d6759977e6d17aa46ab7ad49647df98af Mon Sep 17 00:00:00 2001 From: stack72 Date: Fri, 28 Jun 2019 15:12:44 +0300 Subject: [PATCH] Improve test coverage of AWS JS and Python tests --- misc/test/examples_test.go | 52 ++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/misc/test/examples_test.go b/misc/test/examples_test.go index 44f1b6712..c12e3f986 100644 --- a/misc/test/examples_test.go +++ b/misc/test/examples_test.go @@ -70,17 +70,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://"+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{ @@ -117,6 +106,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://"+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://"+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{ @@ -376,19 +393,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{