test: retry the compat tests as often as other tests (#13369)

The upgrade compatibility tests need frequent retrying to pass because they are slightly flaky. To alleviate manual work borrow similar gotestsum logic from the main go tests CI job to rerun them automatically here.
This commit is contained in:
R.B. Boyer 2022-06-06 16:06:55 -05:00 committed by GitHub
parent db48b4f5a2
commit 28ec70953b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 7 deletions

View File

@ -822,15 +822,19 @@ jobs:
- run: - run:
name: Compatibility Integration Tests name: Compatibility Integration Tests
command: | command: |
subtests=$(ls -d test/integration/consul-container/*/ | grep -v libs | xargs -n 1 basename | circleci tests split)
echo "Running $(echo $subtests | wc -w) subtests"
echo "$subtests"
subtests_formatted=$(echo "$subtests" | sed 's/^/.\//g' | xargs)
mkdir -p /tmp/test-results/ mkdir -p /tmp/test-results/
docker run consul:local consul version
cd ./test/integration/consul-container cd ./test/integration/consul-container
echo "$subtests_formatted" docker run --rm consul:local consul version
gotestsum -- -timeout=30m ./$subtests_formatted --target-version local --latest-version latest gotestsum \
--format=short-verbose \
--debug \
--rerun-fails=3 \
--packages="./..." \
-- \
-timeout=30m \
./... \
--target-version local \
--latest-version latest
ls -lrt ls -lrt
environment: environment:
# this is needed because of incompatibility between RYUK container and circleci # this is needed because of incompatibility between RYUK container and circleci