diff --git a/Makefile b/Makefile index b319ee5..a7420b6 100644 --- a/Makefile +++ b/Makefile @@ -94,7 +94,7 @@ list-ignored-packages: pre-commit: # @HELP Check that code is ready to commit. pre-commit: - $(MAKE) -j \ + ENDURO_PP_INTEGRATION_TEST=1 $(MAKE) -j \ golines \ gosec \ lint \ @@ -124,7 +124,7 @@ test: $(GOTESTSUM) test-ci: # @HELP Run all tests in CI with coverage and the race detector. test-ci: - $(MAKE) test GOTEST_FLAGS="-race -coverprofile=covreport -covermode=atomic" + ENDURO_PP_INTEGRATION_TEST=1 $(MAKE) test GOTEST_FLAGS="-race -coverprofile=covreport -covermode=atomic" test-race: # @HELP Run all tests with the race detector. test-race: diff --git a/internal/integration/integration_test.go b/internal/integration/integration_test.go index 84a9be2..e1c591f 100644 --- a/internal/integration/integration_test.go +++ b/internal/integration/integration_test.go @@ -2,7 +2,10 @@ package integration_test import ( "context" + "os" "path/filepath" + "slices" + "strings" "testing" "time" @@ -135,6 +138,15 @@ func (env *testEnv) copyTestTransfer(name string) { } func TestIntegration(t *testing.T) { + truthy := []string{"1", "t", "true"} + v := strings.ToLower(os.Getenv("ENDURO_PP_INTEGRATION_TEST")) + if !slices.Contains(truthy, v) { + t.Skipf( + "Set ENDURO_PP_INTEGRATION_TEST={%s} to run this test.", + strings.Join(truthy, ","), + ) + } + ctx := context.Background() temporalServer := setUpTemporal(ctx, t)