argo-cd/hack/test.sh
Dan Molik d00fa536e2
feat: New SCM and pull request ApplicationSet generators for Gitea (#8989)
* feat: New SCM and pull request ApplicationSet generators for Gitea

An initial implementation of Pull Request and SCM generators for Gitea.

API paging, and repo labels have not been implemented.

Signed-off-by: Dan Molik <dan@danmolik.com>

* chore: white space in hack/test.sh

re-trigger linting check

Signed-off-by: Dan Molik <dan@danmolik.com>

* chore: add gitea_scm and gitea_pr tests

Signed-off-by: Dan Molik <dan@danmolik.com>

* bug: ensure gitea scm haspath detects directories correctly

Signed-off-by: Dan Molik <dan@danmolik.com>
2022-04-07 09:08:54 -04:00

26 lines
574 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=
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
report() {
set -eux -o pipefail
go-junit-report < $TEST_RESULTS/test.out > $TEST_RESULTS/junit.xml
}
trap 'report' EXIT
go test $TEST_FLAGS -failfast $* 2>&1 | tee $TEST_RESULTS/test.out