diff --git a/Makefile b/Makefile index 90ee5107d3..c5a2d88cd3 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ build: dev: lint test build test: - @go test -coverprofile=coverage.out ./... + @go test -short -coverprofile=coverage.out ./... test_integration: test_integration_cli test_integration_derp test_integration_oidc test_integration_general diff --git a/integration_cli_test.go b/integration_cli_test.go index dc854034b8..0677148309 100644 --- a/integration_cli_test.go +++ b/integration_cli_test.go @@ -27,6 +27,10 @@ type IntegrationCLITestSuite struct { } func TestIntegrationCLITestSuite(t *testing.T) { + if testing.Short() { + t.Skip("skipping integration tests due to short flag") + } + s := new(IntegrationCLITestSuite) suite.Run(t, s) diff --git a/integration_embedded_derp_test.go b/integration_embedded_derp_test.go index 343a04ad08..0b7a8d276a 100644 --- a/integration_embedded_derp_test.go +++ b/integration_embedded_derp_test.go @@ -45,6 +45,10 @@ type IntegrationDERPTestSuite struct { } func TestIntegrationDERPTestSuite(t *testing.T) { + if testing.Short() { + t.Skip("skipping integration tests due to short flag") + } + saveLogs, err := GetEnvBool("HEADSCALE_INTEGRATION_SAVE_LOG") if err != nil { saveLogs = false diff --git a/integration_general_test.go b/integration_general_test.go index 8f318d32d1..ad92a2b2d2 100644 --- a/integration_general_test.go +++ b/integration_general_test.go @@ -40,6 +40,10 @@ type IntegrationTestSuite struct { } func TestIntegrationGeneralTestSuite(t *testing.T) { + if testing.Short() { + t.Skip("skipping integration tests due to short flag") + } + saveLogs, err := GetEnvBool("HEADSCALE_INTEGRATION_SAVE_LOG") if err != nil { saveLogs = false diff --git a/integration_oidc_test.go b/integration_oidc_test.go index 8e5f791002..2f4d7ddfdc 100644 --- a/integration_oidc_test.go +++ b/integration_oidc_test.go @@ -44,6 +44,10 @@ type IntegrationOIDCTestSuite struct { } func TestIntegrationOIDCTestSuite(t *testing.T) { + if testing.Short() { + t.Skip("skipping integration tests due to short flag") + } + saveLogs, err := GetEnvBool("HEADSCALE_INTEGRATION_SAVE_LOG") if err != nil { saveLogs = false