Files
deploy/hack/test.sh
T
a08746fc07 feat: adding gocover to e2e tests (#18130) (#18537)
* feat: adding go coverage to e2e tests

Signed-off-by: rumstead <[email protected]>

* feat: adding go coverage to e2e tests

Signed-off-by: rumstead <[email protected]>

* feat: adding go coverage to e2e tests

Signed-off-by: rumstead <[email protected]>

* feat: adding go coverage to e2e tests

Signed-off-by: rumstead <[email protected]>

* feat: adding go coverage to e2e tests

Signed-off-by: rumstead <[email protected]>

* feat: adding go coverage to e2e tests

Signed-off-by: rumstead <[email protected]>

* feat: adding go coverage to e2e tests

Signed-off-by: rumstead <[email protected]>

* feat: adding go coverage to e2e tests

Signed-off-by: rumstead <[email protected]>

* feat: adding go coverage to e2e tests

Signed-off-by: rumstead <[email protected]>

* feat: adding go coverage to e2e tests

Signed-off-by: rumstead <[email protected]>

* feat: adding go coverage to e2e tests

Signed-off-by: rumstead <[email protected]>

* feat: adding go coverage to e2e tests

Signed-off-by: rumstead <[email protected]>

* feat: adding go coverage to e2e tests

Signed-off-by: rumstead <[email protected]>

* feat: adding go coverage to e2e tests

Signed-off-by: rumstead <[email protected]>

* feat: adding go coverage to e2e tests

Signed-off-by: rumstead <[email protected]>

* feat: adding go coverage to e2e tests

Signed-off-by: rumstead <[email protected]>

* feat: adding go coverage to e2e tests

Signed-off-by: rumstead <[email protected]>

* feat: adding go coverage to e2e tests

Signed-off-by: rumstead <[email protected]>

* try putting profiles in different directories

Signed-off-by: Michael Crenshaw <[email protected]>

* does this upload the whole directory?

Signed-off-by: Michael Crenshaw <[email protected]>

* create directories and only run one test

Signed-off-by: Michael Crenshaw <[email protected]>

* shut everything down before uploading coverage

Signed-off-by: Michael Crenshaw <[email protected]>

* don't fail on goreman failure

Signed-off-by: Michael Crenshaw <[email protected]>

* sleep 30

Signed-off-by: Michael Crenshaw <[email protected]>

* always upload server output

Signed-off-by: Michael Crenshaw <[email protected]>

* fix: implement graceful shutdown for api server

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* Shutdown servers in parallel

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* add noop shutdown function on api server constructor

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* fix waitgroup

Signed-off-by: Leonardo Luz Almeida <[email protected]>

* more attempts to gracefully shut down

Signed-off-by: Michael Crenshaw <[email protected]>

* more tests

Signed-off-by: Michael Crenshaw <[email protected]>

* cleanup

Signed-off-by: Michael Crenshaw <[email protected]>

* revert graceful shutdown work, needs more work

Signed-off-by: Michael Crenshaw <[email protected]>

* more graceful shutdown cleanup

Signed-off-by: Michael Crenshaw <[email protected]>

* lint

Signed-off-by: Michael Crenshaw <[email protected]>

* feat: adding go coverage to e2e tests

Signed-off-by: rumstead <[email protected]>

---------

Signed-off-by: rumstead <[email protected]>
Signed-off-by: Michael Crenshaw <[email protected]>
Signed-off-by: Leonardo Luz Almeida <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
Co-authored-by: Leonardo Luz Almeida <[email protected]>
2024-06-13 14:17:07 -04:00

19 lines
633 B
Bash
Executable File

#!/bin/bash
set -eux -o pipefail
which go-junit-report || go install github.com/jstemmer/go-junit-report@latest
TEST_RESULTS=${TEST_RESULTS:-test-results}
TEST_FLAGS=${TEST_FLAGS:-}
if test "${ARGOCD_TEST_PARALLELISM:-}" != ""; then
TEST_FLAGS="$TEST_FLAGS -p $ARGOCD_TEST_PARALLELISM"
fi
if test "${ARGOCD_TEST_VERBOSE:-}" != ""; then
TEST_FLAGS="$TEST_FLAGS -v"
fi
mkdir -p $TEST_RESULTS
GODEBUG="tarinsecurepath=0,zipinsecurepath=0" ${DIST_DIR}/gotestsum --rerun-fails-report=rerunreport.txt --junitfile=$TEST_RESULTS/junit.xml --format=testname --rerun-fails="$RERUN_FAILS" --packages="$PACKAGES" -- -cover $TEST_FLAGS $*