test: restore e2e-test target and use -integration
This commit is contained in:
parent
da4645e9a4
commit
ffbfb60f40
14
GNUmakefile
14
GNUmakefile
|
@ -263,6 +263,9 @@ test: ## Run the Nomad test suite and/or the Nomad UI test suite
|
|||
@if [ $(RUN_UI_TESTS) ]; then \
|
||||
make test-ui; \
|
||||
fi
|
||||
@if [ $(RUN_E2E_TESTS) ]; then \
|
||||
make e2e-test; \
|
||||
fi
|
||||
|
||||
.PHONY: test-nomad
|
||||
test-nomad: dev ## Run Nomad test suites
|
||||
|
@ -277,6 +280,17 @@ test-nomad: dev ## Run Nomad test suites
|
|||
bash -C "$(PROJECT_ROOT)/scripts/test_check.sh" ; \
|
||||
fi
|
||||
|
||||
.PHONY: e2e-test
|
||||
e2e-test: dev ## Run the Nomad e2e test suite
|
||||
@echo "==> Running Nomad E2E test suites:"
|
||||
go test \
|
||||
$(if $(ENABLE_RACE),-race) $(if $(VERBOSE),-v) \
|
||||
-cover \
|
||||
-timeout=900s \
|
||||
-tags "$(GO_TAGS)" \
|
||||
github.com/hashicorp/nomad/e2e/vault/ \
|
||||
-integration
|
||||
|
||||
.PHONY: clean
|
||||
clean: GOPATH=$(shell go env GOPATH)
|
||||
clean: ## Remove build artifacts
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
# Vault Integration Test
|
||||
|
||||
Not run as part of nightly e2e suite at this point.
|
||||
|
||||
Downloads, caches, and tests Nomad against open source Vault binaries. Runs
|
||||
only when `NOMAD_E2E` is set.
|
||||
only when `-integration` is set.
|
||||
|
||||
Run with:
|
||||
|
||||
```
|
||||
NOMAD_E2E=1 go test
|
||||
cd e2e/vault/
|
||||
go test -integration
|
||||
```
|
||||
|
||||
**Warning: Downloads a lot of Vault versions!**
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
|
@ -28,6 +29,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
integration = flag.Bool("integration", false, "run integration tests")
|
||||
minVaultVer = version.Must(version.NewVersion("0.6.2"))
|
||||
)
|
||||
|
||||
|
@ -248,8 +250,8 @@ func getVault(dst, url string) error {
|
|||
|
||||
// TestVaultCompatibility tests compatibility across Vault versions
|
||||
func TestVaultCompatibility(t *testing.T) {
|
||||
if os.Getenv("NOMAD_E2E") == "" {
|
||||
t.Skip("Skipping e2e tests, NOMAD_E2E not set")
|
||||
if !*integration {
|
||||
t.Skip("skipping test in non-integration mode: add -integration flag to run")
|
||||
}
|
||||
|
||||
vaultBinaries := syncVault(t)
|
||||
|
|
Loading…
Reference in New Issue