Skip to content

Commit

Permalink
Use short test to signal that we dont run integration
Browse files Browse the repository at this point in the history
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
  • Loading branch information
kradalby committed Oct 18, 2022
1 parent c6f82c3 commit dfadb96
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions integration_cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions integration_embedded_derp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions integration_general_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions integration_oidc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dfadb96

Please sign in to comment.