diff options
author | 2017-12-25 16:35:04 +0200 | |
---|---|---|
committer | 2018-01-17 17:56:08 +0200 | |
commit | a2d8b3bf42f2ea4f82790e0c86d2ce744657310c (patch) | |
tree | ec62b95aee0afd2bf2a4b2aaad0a41c539b87345 /test/csit/scripts/sdc/clone_and_setup_sdc_data.sh | |
parent | f0285a52fb3a13fdb82905428be805c3c0e160a0 (diff) |
Add branch support for sdc csit
Change-Id: I45e28013113123abd28e5d42ded1a2c7a64b0f8b
Issue-ID: SDC-761
Signed-off-by: Yuli Shlosberg <ys9693@att.com>
Diffstat (limited to 'test/csit/scripts/sdc/clone_and_setup_sdc_data.sh')
-rw-r--r-- | test/csit/scripts/sdc/clone_and_setup_sdc_data.sh | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/test/csit/scripts/sdc/clone_and_setup_sdc_data.sh b/test/csit/scripts/sdc/clone_and_setup_sdc_data.sh index 5dbfb5fc2..1025f405d 100644 --- a/test/csit/scripts/sdc/clone_and_setup_sdc_data.sh +++ b/test/csit/scripts/sdc/clone_and_setup_sdc_data.sh @@ -1,4 +1,7 @@ #!/bin/bash + + +set -x # # ============LICENSE_START======================================================= # ONAP CLAMP @@ -61,4 +64,50 @@ export HOST_IP=$IP_ADDRESS sed -i "s/\"ueb_url_list\":.*/\"ueb_url_list\": \""$MR_IP_ADDR","$MR_IP_ADDR"\",/g" ${WORKSPACE}/data/environments/$ENV_NAME.json sed -i "s/\"fqdn\":.*/\"fqdn\": [\""$MR_IP_ADDR"\", \""$MR_IP_ADDR"\"]/g" ${WORKSPACE}/data/environments/$ENV_NAME.json + +source ${WORKSPACE}/data/clone/sdc/version.properties +export RELEASE=$major.$minor-STAGING-latest +export DEP_ENV=$ENV_NAME + +cp ${WORKSPACE}/data/clone/sdc/sdc-os-chef/scripts/docker_run.sh ${WORKSPACE}/test/csit/scripts/sdc/ +#sed -i "s~/data~${WORKSPACE}\/data~g" ${WORKSPACE}/test/csit/scripts/sdc/docker_run.sh +#sed -i "s/HOST_IP=\${IP}/HOST_IP=\${HOST_IP}/g" ${WORKSPACE}/test/csit/scripts/sdc/docker_run.sh +sed -i "s/ENVNAME=\"\${DEP_ENV}\"/ENVNAME=\"\${ENV_NAME}\"/g" ${WORKSPACE}/test/csit/scripts/sdc/docker_run.sh + +source ${WORKSPACE}/data/clone/sdc/version.properties +export RELEASE=$major.$minor-STAGING-latest + + +bash -x ${WORKSPACE}/test/csit/scripts/sdc/docker_run.sh -r ${RELEASE} -p 10001 -t + +sleep 120 + +#monitor sanity process + +TIME_OUT=1200 +INTERVAL=20 +TIME=0 +while [ "$TIME" -lt "$TIME_OUT" ]; do + +PID=`docker exec -i sdc-sanity ps -ef | grep java | awk '{print $2}'` +echo sanity PID is -- $PID + +if [ -z "$PID" ] + then + echo SDC sanity finished in $TIME seconds + break + fi + + echo Sleep: $INTERVAL seconds before testing if SDC sanity completed. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds + sleep $INTERVAL + TIME=$(($TIME+$INTERVAL)) +done + +if [ "$TIME" -ge "$TIME_OUT" ] + then + echo TIME OUT: Sany was NOT completed in $TIME_OUT seconds... Could cause problems for tests... +fi + + + |