Skip to content

Commit

Permalink
skip e2e/vault if integration isn't set
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed Sep 25, 2018
1 parent 454c1d0 commit 088f51a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ e2e-test: dev ## Run the Nomad e2e test suite
-cover \
-timeout=900s \
github.com/hashicorp/nomad/e2e/vault/
-integration

.PHONY: clean
clean: GOPATH=$(shell go env GOPATH)
Expand Down
7 changes: 7 additions & 0 deletions e2e/vault/vault_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"archive/zip"
"bytes"
"context"
"flag"
"fmt"
"io"
"io/ioutil"
Expand All @@ -24,6 +25,8 @@ import (
vapi "github.com/hashicorp/vault/api"
)

var integration = flag.Bool("integration", false, "run integration tests")

// harness is used to retrieve the required Vault test binaries
type harness struct {
t *testing.T
Expand Down Expand Up @@ -171,6 +174,10 @@ func (h *harness) get(version string) error {

// TestVaultCompatibility tests compatibility across Vault versions
func TestVaultCompatibility(t *testing.T) {
if !*integration {
t.Skip("skipping test in non-integration mode.")
}

h := newHarness(t)
vaultBinaries := h.reconcile()

Expand Down

0 comments on commit 088f51a

Please sign in to comment.