From 2f4d7a9789440042a590f2104c8695b116389777 Mon Sep 17 00:00:00 2001 From: joeduffy Date: Sun, 6 Aug 2017 08:26:20 -0700 Subject: [PATCH] Run integration tests This change runs the examples integration tests for every test run. They used to be split out because the AWS tests take so long, but now those are in their own separate package. Running the integration tests here more frequently will prevent breaking the most basic Lumi CLI commands and capabilities. --- Makefile | 9 ++------- examples/examples_test.go | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 4223b0d12..cbf8cf23f 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ default: banner vet test install lint_quiet all: banner_all vet test install lint_quiet lumijs lumirtpkg lumijspkg lumipkg .PHONY: nightly -nightly: banner_all vet test install lint_quiet lumijs lumirtpkg lumijspkg lumipkg examples gocover +nightly: all gocover .PHONY: banner banner: @@ -67,7 +67,7 @@ vet: .PHONY: test test: @$(ECHO) "\033[0;32mTEST:\033[0m" - go test -cover -parallel ${TESTPARALLELISM} ${PROJECT_PKGS} + go test -cover -parallel ${TESTPARALLELISM} ${PROJECT_PKGS} ./examples .PHONY: lumijs lumijs: @@ -86,11 +86,6 @@ publish: ./scripts/publish.sh .PHONY: publish -.PHONY: examples -examples: - @$(ECHO) "\033[0;32mTEST EXAMPLES:\033[0m" - go test -v -cover -timeout 1h -parallel ${TESTPARALLELISM} ./examples - .PHONY: gocover gocover: @$(ECHO) "\033[0;32mGO CODE COVERAGE:\033[0m" diff --git a/examples/examples_test.go b/examples/examples_test.go index 9a0839041..e2c0dbed5 100644 --- a/examples/examples_test.go +++ b/examples/examples_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/pulumi/pulumi-fabric/pkg/integrationtesting" + "github.com/pulumi/pulumi-fabric/pkg/testing/integration" ) func TestExamples(t *testing.T) { @@ -17,19 +17,19 @@ func TestExamples(t *testing.T) { if !assert.NoError(t, err, "expected a valid working directory: %v", err) { return } - examples := []string{ - path.Join(cwd, "basic/minimal"), - } - options := integrationtesting.LumiProgramTestOptions{ - Dependencies: []string{ - "@lumi/lumirt", - "@lumi/lumi", + examples := []integration.LumiProgramTestOptions{ + { + Dir: path.Join(cwd, "basic/minimal"), + Dependencies: []string{ + "@lumi/lumirt", + "@lumi/lumi", + }, }, } for _, ex := range examples { example := ex - t.Run(example, func(t *testing.T) { - integrationtesting.LumiProgramTest(t, example, options) + t.Run(example.Dir, func(t *testing.T) { + integration.LumiProgramTest(t, example) }) } }