|
|
@ -72,7 +72,8 @@ function start_consul {
|
|
|
|
local DC=${1:-primary}
|
|
|
|
local DC=${1:-primary}
|
|
|
|
|
|
|
|
|
|
|
|
# Start consul now as setup script needs it up
|
|
|
|
# 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}
|
|
|
|
docker-compose up -d consul-${DC}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -95,7 +96,8 @@ function start_services {
|
|
|
|
|
|
|
|
|
|
|
|
# Start containers required
|
|
|
|
# Start containers required
|
|
|
|
if [ ! -z "$REQUIRED_SERVICES" ] ; then
|
|
|
|
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
|
|
|
|
docker-compose up --build -d $REQUIRED_SERVICES
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
@ -112,7 +114,8 @@ function verify {
|
|
|
|
res=0
|
|
|
|
res=0
|
|
|
|
|
|
|
|
|
|
|
|
# Nuke any previous case's verify container.
|
|
|
|
# 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
|
|
|
|
if docker-compose up --abort-on-container-exit --exit-code-from verify-${DC} verify-${DC} ; then
|
|
|
|
echogreen "✓ PASS"
|
|
|
|
echogreen "✓ PASS"
|
|
|
@ -156,7 +159,8 @@ function stop_services {
|
|
|
|
if [ -f "${CASE_DIR}/teardown.sh" ] ; then
|
|
|
|
if [ -f "${CASE_DIR}/teardown.sh" ] ; then
|
|
|
|
source "${CASE_DIR}/teardown.sh"
|
|
|
|
source "${CASE_DIR}/teardown.sh"
|
|
|
|
fi
|
|
|
|
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 {
|
|
|
|
function init_vars {
|
|
|
|