go_test.yml on ent has needlessly diverged from oss; make them identical again (#11731)

This commit is contained in:
Nick Cabatoff 2021-06-01 14:40:38 +02:00 committed by GitHub
parent 3857cdbeaf
commit 2a98a59861
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 64 additions and 18 deletions

65
.circleci/config.yml generated
View File

@ -916,13 +916,13 @@ jobs:
jq -r 'select(.Deps != null) |
select(any(.Deps[] ; contains("github.com/hashicorp/vault/helper/testhelpers/docker"))) |
.ForTest | select(. != null)' |
sort -u | circleci tests split --split-by=timings --timings-type=classname)
sort -u | grep -v vault/integ | circleci tests split --split-by=timings --timings-type=classname)
else
package_names=$(go list -test -json ./... |
jq -r 'select(.Deps != null) |
select(all(.Deps[] ; contains("github.com/hashicorp/vault/helper/testhelpers/docker")|not)) |
.ForTest | select(. != null)' |
sort -u | circleci tests split --split-by=timings --timings-type=classname)
sort -u | grep -v vault/integ | circleci tests split --split-by=timings --timings-type=classname)
fi
# After running tests split step, we are now running the following steps
@ -933,6 +933,11 @@ jobs:
make prep
mkdir -p test-results/go-test
# Don't tempt fate by having the license env var populated: tests should
# have to use it explicitly (via env var VAULT_LICENSE_CI) rather than
# depending on an implicit behaviour.
VAULT_LICENSE=
# Create a docker network for our testcontainer
if [ $USE_DOCKER == 1 ]; then
# Despite the fact that we're using a circleci image (thus getting the
@ -963,6 +968,7 @@ jobs:
docker exec -w /go/src/github.com/hashicorp/vault/ \
-e GO111MODULE -e CIRCLECI -e GOCACHE=/tmp/gocache -e VAULT_CI_GO_TEST_RACE \
-e VAULT_LICENSE_CI \
testcontainer \
gotestsum --format=short-verbose \
--junitfile test-results/go-test/results.xml \
@ -974,7 +980,8 @@ jobs:
\
${package_names}
else
GOCACHE=/tmp/go-cache \
GOARCH=amd64 \
GOCACHE=/tmp/go-cache \
gotestsum --format=short-verbose \
--junitfile test-results/go-test/results.xml \
--jsonfile test-results/go-test/results.json \
@ -1131,13 +1138,13 @@ jobs:
jq -r 'select(.Deps != null) |
select(any(.Deps[] ; contains("github.com/hashicorp/vault/helper/testhelpers/docker"))) |
.ForTest | select(. != null)' |
sort -u | circleci tests split --split-by=timings --timings-type=classname)
sort -u | grep -v vault/integ | circleci tests split --split-by=timings --timings-type=classname)
else
package_names=$(go list -test -json ./... |
jq -r 'select(.Deps != null) |
select(all(.Deps[] ; contains("github.com/hashicorp/vault/helper/testhelpers/docker")|not)) |
.ForTest | select(. != null)' |
sort -u | circleci tests split --split-by=timings --timings-type=classname)
sort -u | grep -v vault/integ | circleci tests split --split-by=timings --timings-type=classname)
fi
# After running tests split step, we are now running the following steps
@ -1148,6 +1155,11 @@ jobs:
make prep
mkdir -p test-results/go-test
# Don't tempt fate by having the license env var populated: tests should
# have to use it explicitly (via env var VAULT_LICENSE_CI) rather than
# depending on an implicit behaviour.
VAULT_LICENSE=
# Create a docker network for our testcontainer
if [ $USE_DOCKER == 1 ]; then
# Despite the fact that we're using a circleci image (thus getting the
@ -1178,6 +1190,7 @@ jobs:
docker exec -w /go/src/github.com/hashicorp/vault/ \
-e GO111MODULE -e CIRCLECI -e GOCACHE=/tmp/gocache -e VAULT_CI_GO_TEST_RACE \
-e VAULT_LICENSE_CI \
testcontainer \
gotestsum --format=short-verbose \
--junitfile test-results/go-test/results.xml \
@ -1189,7 +1202,8 @@ jobs:
-race \
${package_names}
else
GOCACHE=/tmp/go-cache \
GOARCH=amd64 \
GOCACHE=/tmp/go-cache \
gotestsum --format=short-verbose \
--junitfile test-results/go-test/results.xml \
--jsonfile test-results/go-test/results.json \
@ -1597,13 +1611,13 @@ jobs:
jq -r 'select(.Deps != null) |
select(any(.Deps[] ; contains("github.com/hashicorp/vault/helper/testhelpers/docker"))) |
.ForTest | select(. != null)' |
sort -u | circleci tests split --split-by=timings --timings-type=classname)
sort -u | grep -v vault/integ | circleci tests split --split-by=timings --timings-type=classname)
else
package_names=$(go list -test -json ./... |
jq -r 'select(.Deps != null) |
select(all(.Deps[] ; contains("github.com/hashicorp/vault/helper/testhelpers/docker")|not)) |
.ForTest | select(. != null)' |
sort -u | circleci tests split --split-by=timings --timings-type=classname)
sort -u | grep -v vault/integ | circleci tests split --split-by=timings --timings-type=classname)
fi
# After running tests split step, we are now running the following steps
@ -1614,6 +1628,11 @@ jobs:
make prep
mkdir -p test-results/go-test
# Don't tempt fate by having the license env var populated: tests should
# have to use it explicitly (via env var VAULT_LICENSE_CI) rather than
# depending on an implicit behaviour.
VAULT_LICENSE=
# Create a docker network for our testcontainer
if [ $USE_DOCKER == 1 ]; then
# Despite the fact that we're using a circleci image (thus getting the
@ -1644,6 +1663,7 @@ jobs:
docker exec -w /go/src/github.com/hashicorp/vault/ \
-e GO111MODULE -e CIRCLECI -e GOCACHE=/tmp/gocache -e VAULT_CI_GO_TEST_RACE \
-e VAULT_LICENSE_CI \
testcontainer \
gotestsum --format=short-verbose \
--junitfile test-results/go-test/results.xml \
@ -1655,7 +1675,8 @@ jobs:
\
${package_names}
else
GOCACHE=/tmp/go-cache \
GOARCH=amd64 \
GOCACHE=/tmp/go-cache \
gotestsum --format=short-verbose \
--junitfile test-results/go-test/results.xml \
--jsonfile test-results/go-test/results.json \
@ -1743,13 +1764,13 @@ jobs:
jq -r 'select(.Deps != null) |
select(any(.Deps[] ; contains("github.com/hashicorp/vault/helper/testhelpers/docker"))) |
.ForTest | select(. != null)' |
sort -u | circleci tests split --split-by=timings --timings-type=classname)
sort -u | grep -v vault/integ | circleci tests split --split-by=timings --timings-type=classname)
else
package_names=$(go list -test -json ./... |
jq -r 'select(.Deps != null) |
select(all(.Deps[] ; contains("github.com/hashicorp/vault/helper/testhelpers/docker")|not)) |
.ForTest | select(. != null)' |
sort -u | circleci tests split --split-by=timings --timings-type=classname)
sort -u | grep -v vault/integ | circleci tests split --split-by=timings --timings-type=classname)
fi
# After running tests split step, we are now running the following steps
@ -1760,6 +1781,11 @@ jobs:
make prep
mkdir -p test-results/go-test
# Don't tempt fate by having the license env var populated: tests should
# have to use it explicitly (via env var VAULT_LICENSE_CI) rather than
# depending on an implicit behaviour.
VAULT_LICENSE=
# Create a docker network for our testcontainer
if [ $USE_DOCKER == 1 ]; then
# Despite the fact that we're using a circleci image (thus getting the
@ -1790,6 +1816,7 @@ jobs:
docker exec -w /go/src/github.com/hashicorp/vault/ \
-e GO111MODULE -e CIRCLECI -e GOCACHE=/tmp/gocache -e VAULT_CI_GO_TEST_RACE \
-e VAULT_LICENSE_CI \
testcontainer \
gotestsum --format=short-verbose \
--junitfile test-results/go-test/results.xml \
@ -1801,7 +1828,8 @@ jobs:
\
${package_names}
else
GOCACHE=/tmp/go-cache \
GOARCH=amd64 \
GOCACHE=/tmp/go-cache \
gotestsum --format=short-verbose \
--junitfile test-results/go-test/results.xml \
--jsonfile test-results/go-test/results.json \
@ -2340,13 +2368,13 @@ jobs:
jq -r 'select(.Deps != null) |
select(any(.Deps[] ; contains("github.com/hashicorp/vault/helper/testhelpers/docker"))) |
.ForTest | select(. != null)' |
sort -u | circleci tests split --split-by=timings --timings-type=classname)
sort -u | grep -v vault/integ | circleci tests split --split-by=timings --timings-type=classname)
else
package_names=$(go list -test -json ./... |
jq -r 'select(.Deps != null) |
select(all(.Deps[] ; contains("github.com/hashicorp/vault/helper/testhelpers/docker")|not)) |
.ForTest | select(. != null)' |
sort -u | circleci tests split --split-by=timings --timings-type=classname)
sort -u | grep -v vault/integ | circleci tests split --split-by=timings --timings-type=classname)
fi
# After running tests split step, we are now running the following steps
@ -2357,6 +2385,11 @@ jobs:
make prep
mkdir -p test-results/go-test
# Don't tempt fate by having the license env var populated: tests should
# have to use it explicitly (via env var VAULT_LICENSE_CI) rather than
# depending on an implicit behaviour.
VAULT_LICENSE=
# Create a docker network for our testcontainer
if [ $USE_DOCKER == 1 ]; then
# Despite the fact that we're using a circleci image (thus getting the
@ -2387,6 +2420,7 @@ jobs:
docker exec -w /go/src/github.com/hashicorp/vault/ \
-e GO111MODULE -e CIRCLECI -e GOCACHE=/tmp/gocache -e VAULT_CI_GO_TEST_RACE \
-e VAULT_LICENSE_CI \
testcontainer \
gotestsum --format=short-verbose \
--junitfile test-results/go-test/results.xml \
@ -2398,7 +2432,8 @@ jobs:
-race \
${package_names}
else
GOCACHE=/tmp/go-cache \
GOARCH=amd64 \
GOCACHE=/tmp/go-cache \
gotestsum --format=short-verbose \
--junitfile test-results/go-test/results.xml \
--jsonfile test-results/go-test/results.json \

View File

@ -18,6 +18,10 @@ parameters:
use_docker:
type: boolean
default: false
arch:
type: string
# Only supported for use_docker=false, and only other value allowed is 386
default: amd64
steps:
- run:
name: Compute test cache key
@ -55,13 +59,13 @@ steps:
jq -r 'select(.Deps != null) |
select(any(.Deps[] ; contains("github.com/hashicorp/vault/helper/testhelpers/docker"))) |
.ForTest | select(. != null)' |
sort -u | circleci tests split --split-by=timings --timings-type=classname)
sort -u | grep -v vault/integ | circleci tests split --split-by=timings --timings-type=classname)
else
package_names=$(go list -test -json ./... |
jq -r 'select(.Deps != null) |
select(all(.Deps[] ; contains("github.com/hashicorp/vault/helper/testhelpers/docker")|not)) |
.ForTest | select(. != null)' |
sort -u | circleci tests split --split-by=timings --timings-type=classname)
sort -u | grep -v vault/integ | circleci tests split --split-by=timings --timings-type=classname)
fi
# After running tests split step, we are now running the following steps
@ -72,6 +76,11 @@ steps:
make prep
mkdir -p test-results/go-test
# Don't tempt fate by having the license env var populated: tests should
# have to use it explicitly (via env var VAULT_LICENSE_CI) rather than
# depending on an implicit behaviour.
VAULT_LICENSE=
# Create a docker network for our testcontainer
if [ $USE_DOCKER == 1 ]; then
# Despite the fact that we're using a circleci image (thus getting the
@ -102,6 +111,7 @@ steps:
docker exec -w /go/src/github.com/hashicorp/vault/ \
-e GO111MODULE -e CIRCLECI -e GOCACHE=/tmp/gocache -e VAULT_CI_GO_TEST_RACE \
-e VAULT_LICENSE_CI \
testcontainer \
gotestsum --format=short-verbose \
--junitfile test-results/go-test/results.xml \
@ -113,7 +123,8 @@ steps:
<< parameters.extra_flags >> \
${package_names}
else
GOCACHE=<< parameters.cache_dir >> \
GOARCH=<< parameters.arch >> \
GOCACHE=<< parameters.cache_dir >> \
gotestsum --format=short-verbose \
--junitfile test-results/go-test/results.xml \
--jsonfile test-results/go-test/results.json \