fix integration test override config which requires environment variables before calling compose (#10694)

This commit is contained in:
Clint Wylie 2020-12-18 17:57:07 -08:00 committed by GitHub
parent ca3b925133
commit 92e5700e1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 3 deletions

View File

@ -44,6 +44,12 @@ fi
docker-compose -f ${DOCKERDIR}/docker-compose.druid-hadoop.yml up -d
fi
if [ -z "$DRUID_INTEGRATION_TEST_OVERRIDE_CONFIG_PATH" ]
then
# Start Druid cluster
docker-compose $(getComposeArgs) up -d
else
# run druid cluster with override config
OVERRIDE_ENV=$DRUID_INTEGRATION_TEST_OVERRIDE_CONFIG_PATH docker-compose $(getComposeArgs) up -d
fi
}

View File

@ -26,7 +26,22 @@ then
exit 0
fi
docker-compose $(getComposeArgs) down
# stop hadoop container if it exists (can't use docker-compose down because it shares network)
HADOOP_CONTAINER="$(docker ps -aq -f name=druid-it-hadoop)"
if [ ! -z "$HADOOP_CONTAINER" ]
then
docker stop druid-it-hadoop
docker rm druid-it-hadoop
fi
# bring down using the same compose args we started with
if [ -z "$DRUID_INTEGRATION_TEST_OVERRIDE_CONFIG_PATH" ]
then
docker-compose $(getComposeArgs) down
else
OVERRIDE_ENV=$DRUID_INTEGRATION_TEST_OVERRIDE_CONFIG_PATH docker-compose $(getComposeArgs) down
fi
if [ ! -z "$(docker network ls -q -f name=druid-it-net)" ]
then