From 5204afc73b1cddc8699e0e203a4043dfa399a20a Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Wed, 14 Oct 2020 14:53:21 -0400 Subject: [PATCH] ci: make split between e2e and integration tests explicit (#9091) Currently we compile (but don't run) the e2e tests as part of `test-other`, which is skipped for branches named `e2e-*`. Move this check into the `test-e2e` job. Split out the vault compatibility integration check as its own makefile target for clarity. --- .circleci/config.yml | 4 +++- .circleci/config/jobs/test-e2e.yml | 1 + .circleci/config/workflows/build-test.yml | 2 +- GNUmakefile | 9 +++++++++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8d046c34ad2..4fbc5aa5643 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -807,7 +807,7 @@ jobs: - PAGER: cat - GOTEST_MOD: '' - GOTEST_PKGS: '' - - GOTEST_PKGS_EXCLUDE: ./api|./client|./drivers/docker|./drivers/exec|./drivers/shared/executor|./nomad|./devices + - GOTEST_PKGS_EXCLUDE: ./api|./client|./drivers/docker|./drivers/exec|./drivers/shared/executor|./nomad|./devices|./e2e - GOTESTARCH: amd64 steps: - checkout @@ -1234,6 +1234,8 @@ jobs: name: prepare non-root user - run: command: sudo -E -H -u circleci PATH=${PATH} make deps + - run: + command: sudo -E -H -u circleci PATH=${PATH} make integration-test - run: command: sudo -E -H -u circleci PATH=${PATH} make e2e-test environment: diff --git a/.circleci/config/jobs/test-e2e.yml b/.circleci/config/jobs/test-e2e.yml index 103cc7fb964..0cde200c18e 100644 --- a/.circleci/config/jobs/test-e2e.yml +++ b/.circleci/config/jobs/test-e2e.yml @@ -14,4 +14,5 @@ steps: chown -R circleci:circleci /go - run: sudo -E -H -u circleci PATH=${PATH} make deps + - run: sudo -E -H -u circleci PATH=${PATH} make integration-test - run: sudo -E -H -u circleci PATH=${PATH} make e2e-test diff --git a/.circleci/config/workflows/build-test.yml b/.circleci/config/workflows/build-test.yml index ae78aa2d49e..f04abd93139 100644 --- a/.circleci/config/workflows/build-test.yml +++ b/.circleci/config/workflows/build-test.yml @@ -69,7 +69,7 @@ jobs: filters: *backend_test_branches_filter - test-machine: name: "test-other" - exclude_packages: "./api|./client|./drivers/docker|./drivers/exec|./drivers/shared/executor|./nomad|./devices" + exclude_packages: "./api|./client|./drivers/docker|./drivers/exec|./drivers/shared/executor|./nomad|./devices|./e2e" filters: *backend_test_branches_filter - test-machine: name: "test-docker" diff --git a/GNUmakefile b/GNUmakefile index 566a38fbb99..07e49f9ea13 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -351,6 +351,15 @@ test-nomad-module: dev ## Run Nomad test suites on a sub-module .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) \ + -timeout=900s \ + -tags "$(GO_TAGS)" \ + github.com/hashicorp/nomad/e2e + +.PHONY: integration-test +integration-test: dev ## Run Nomad integration tests + @echo "==> Running Nomad integration test suites:" go test \ $(if $(ENABLE_RACE),-race) $(if $(VERBOSE),-v) \ -cover \