From 50e7ec9e942e0aaa75867ed854c926639514e5e7 Mon Sep 17 00:00:00 2001 From: "waqas.ikram" Date: Wed, 14 Aug 2019 14:27:41 +0000 Subject: Minor update to wait-for-container script Change-Id: I60fe89b1c16b961718e371f5bcf54b9d884160a7 Issue-ID: SO-2144 Signed-off-by: waqas.ikram --- plans/so/integration-etsi-testing/setup.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'plans/so/integration-etsi-testing/setup.sh') diff --git a/plans/so/integration-etsi-testing/setup.sh b/plans/so/integration-etsi-testing/setup.sh index 6f0c0106..ee0058ef 100755 --- a/plans/so/integration-etsi-testing/setup.sh +++ b/plans/so/integration-etsi-testing/setup.sh @@ -47,6 +47,16 @@ echo "Running $SCRIPT_HOME/$SCRIPT_NAME ..." export $(egrep -v '^#' $ENV_FILE | xargs) +MANDATORY_VARIABLES_NAMES=( "NEXUS_DOCKER_REPO_MSO" "TAG" "TIME_OUT_DEFAULT_VALUE_SEC" "PROJECT_NAME" "DEFAULT_NETWORK_NAME") + +for var in "${MANDATORY_VARIABLES_NAMES[@]}" + do + if [ -z "${!var}" ]; then + echo "Missing mandatory attribute $var in $ENV_FILE" + exit 1 + fi +done + if [[ ! "$TEMP_DIR_PATH" || ! -d "$TEMP_DIR_PATH" ]]; then echo "Creating temporary directory $TEMP_DIR_PATH" mkdir $TEMP_DIR_PATH @@ -154,7 +164,7 @@ fi API_INFRA_CONTAINER_NAME="api-handler-infra" echo "Will execute $WAIT_FOR_CONTAINER_SCRIPT to wait for $API_INFRA_CONTAINER_NAME container to start up" -$WAIT_FOR_CONTAINER_SCRIPT -n "$API_INFRA_CONTAINER_NAME" -t "300" -p "${PROJECT_NAME}_default" +$WAIT_FOR_CONTAINER_SCRIPT -c "$API_INFRA_CONTAINER_NAME" -t "300" -n "$DEFAULT_NETWORK_NAME" if [ $? -ne 0 ]; then echo "ERROR: $WAIT_FOR_CONTAINER_SCRIPT failed" -- cgit 1.2.3-korg