speed up envoy integ tests by not politely stopping containers before destroying them (#8969)
In local testing this sped up the stop_services call from 11s to 1s per test.
This commit is contained in:
parent
d15d2b5b2c
commit
e8587c58fa
|
@ -72,7 +72,8 @@ function start_consul {
|
|||
local DC=${1:-primary}
|
||||
|
||||
# Start consul now as setup script needs it up
|
||||
docker-compose rm -s -v -f consul-${DC} || true
|
||||
docker-compose kill consul-${DC} || true
|
||||
docker-compose rm -v -f consul-${DC} || true
|
||||
docker-compose up -d consul-${DC}
|
||||
}
|
||||
|
||||
|
@ -95,7 +96,8 @@ function start_services {
|
|||
|
||||
# Start containers required
|
||||
if [ ! -z "$REQUIRED_SERVICES" ] ; then
|
||||
docker-compose rm -s -v -f $REQUIRED_SERVICES || true
|
||||
docker-compose kill $REQUIRED_SERVICES || true
|
||||
docker-compose rm -v -f $REQUIRED_SERVICES || true
|
||||
docker-compose up --build -d $REQUIRED_SERVICES
|
||||
fi
|
||||
|
||||
|
@ -112,7 +114,8 @@ function verify {
|
|||
res=0
|
||||
|
||||
# Nuke any previous case's verify container.
|
||||
docker-compose rm -s -v -f verify-${DC} || true
|
||||
docker-compose kill verify-${DC} || true
|
||||
docker-compose rm -v -f verify-${DC} || true
|
||||
|
||||
if docker-compose up --abort-on-container-exit --exit-code-from verify-${DC} verify-${DC} ; then
|
||||
echogreen "✓ PASS"
|
||||
|
@ -156,7 +159,8 @@ function stop_services {
|
|||
if [ -f "${CASE_DIR}/teardown.sh" ] ; then
|
||||
source "${CASE_DIR}/teardown.sh"
|
||||
fi
|
||||
docker-compose rm -s -v -f $REQUIRED_SERVICES || true
|
||||
docker-compose kill $REQUIRED_SERVICES || true
|
||||
docker-compose rm -v -f $REQUIRED_SERVICES || true
|
||||
}
|
||||
|
||||
function init_vars {
|
||||
|
|
Loading…
Reference in New Issue