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 fbee9eda08
commit 321e236891
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:
name: Compatibility Integration Tests
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/
docker run consul:local consul version
cd ./test/integration/consul-container
echo "$subtests_formatted"
gotestsum -- -timeout=30m ./$subtests_formatted --target-version local --latest-version latest
docker run --rm consul:local consul version
gotestsum \
--format=short-verbose \
--debug \
--rerun-fails=3 \
--packages="./..." \
-- \
-timeout=30m \
./... \
--target-version local \
--latest-version latest
ls -lrt
environment:
# this is needed because of incompatibility between RYUK container and circleci