Envoy integration test improvements (#5797)

* Grab consul logs on integration test failures too and don't remove .gitignore

* Don't wipe logs so we have some artifacts to upload at the end
This commit is contained in:
Paul Banks 2019-05-21 14:17:41 +01:00 committed by GitHub
parent f452de1c50
commit 2d47b28722
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -83,7 +83,10 @@ for c in ./case-*/ ; do
# Wipe state # Wipe state
docker-compose up wipe-volumes docker-compose up wipe-volumes
rm -rf workdir/* # Note, we use explicit set of dirs so we don't delete .gitignore. Also,
# don't wipe logs between runs as they are already split and we need them to
# upload as artifacts later.
rm -rf workdir/{consul,envoy,bats,statsd}
mkdir -p workdir/{consul,envoy,bats,statsd,logs} mkdir -p workdir/{consul,envoy,bats,statsd,logs}
# Reload consul config from defaults # Reload consul config from defaults
@ -96,12 +99,7 @@ for c in ./case-*/ ; do
# can't use shared volumes) # can't use shared volumes)
docker cp workdir/. envoy_workdir_1:/workdir docker cp workdir/. envoy_workdir_1:/workdir
# Restart Consul. We don't just reload because some configs under test don't # Start consul now as setup script needs it up
# work with reload and because you can get different effects from running
# tests in isolation which always have fresh Consul vs in the full suite.
# It's pretty quick to start and stop so this is better isolation.
echo "(Re)starting Consul"
docker-compose stop consul
docker-compose up -d consul docker-compose up -d consul
# Copy all the test files # Copy all the test files
@ -139,6 +137,8 @@ for c in ./case-*/ ; do
fi fi
echo "================================================" echo "================================================"
# Hack consul into the list of containers to stop and dump logs for.
REQUIRED_SERVICES="$REQUIRED_SERVICES consul"
# Teardown # Teardown
if [ -f "${c}teardown.sh" ] ; then if [ -f "${c}teardown.sh" ] ; then