From eaac220bb37ef8afe0be93553accb894997da8f6 Mon Sep 17 00:00:00 2001 From: Kiran Kamineni Date: Tue, 3 Apr 2018 09:22:06 -0700 Subject: Fixing broken CSIT by 40573 SMS CSIT was broken because of patch 40573 This patch should fix that issue Issue-ID: AAF-189 Change-Id: I4a26841e833237ad485ca62fa76262b1832c5946 Signed-off-by: Kiran Kamineni --- test/csit/plans/aaf/sms-test-plan/setup.sh | 40 +++++++++++++++++++----------- 1 file changed, 26 insertions(+), 14 deletions(-) (limited to 'test/csit/plans/aaf/sms-test-plan/setup.sh') diff --git a/test/csit/plans/aaf/sms-test-plan/setup.sh b/test/csit/plans/aaf/sms-test-plan/setup.sh index 5d1973ad8..9f77b698e 100755 --- a/test/csit/plans/aaf/sms-test-plan/setup.sh +++ b/test/csit/plans/aaf/sms-test-plan/setup.sh @@ -22,38 +22,50 @@ CONFIG_FILE=$(pwd)/config/smsconfig.json mkdir -p $(pwd)/config +docker login -u docker -p docker nexus3.onap.org:10001 +docker pull nexus3.onap.org:10001/onap/aaf/sms +docker pull docker.io/vault:0.9.5 + +# +# Running vault in dev server mode here for CSIT +# In HELM it runs in production mode +# +docker run -e "VAULT_DEV_ROOT_TOKEN_ID=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" \ + -e SKIP_SETCAP=true \ + --name vault -d -p 8200:8200 vault:0.9.5 + +SMSDB_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' vault) cat << EOF > $CONFIG_FILE { "cafile": "auth/selfsignedca.pem", "servercert": "auth/server.cert", "serverkey": "auth/server.key", - "vaultaddress": "http://$HOSTNAME:8200", + "smsdbaddress": "http://$SMSDB_IP:8200", "vaulttoken": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "disable_tls": true } EOF -docker login -u docker -p docker nexus3.onap.org:10001 -docker pull nexus3.onap.org:10001/onap/aaf/sms -docker pull docker.io/vault:0.9.5 -# -# Running vault in dev server mode here for CSIT -# In HELM it runs in production mode -# -docker run -e "VAULT_DEV_ROOT_TOKEN_ID=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" \ - -e SKIP_SETCAP=true \ - --name vault -d -p 8200:8200 vault:0.9.5 -docker run --workdir /sms -v "$(pwd)"/config/smsconfig.json:/sms/smsconfig.json \ +cat $CONFIG_FILE + +docker run --workdir /sms -v $CONFIG_FILE:/sms/smsconfig.json \ --name sms -d -p 10443:10443 nexus3.onap.org:10001/onap/aaf/sms +SMS_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' sms) + echo "###### WAITING FOR ALL CONTAINERS TO COME UP" -sleep 10 +sleep 20 +for i in {1..20}; do + curl -sS -m 1 http://${SMSDB_IP}:8200/v1/sys/seal-status && break + echo sleep $i + sleep $i +done # # add here all ROBOT_VARIABLES settings # echo "# sms robot variables settings"; -ROBOT_VARIABLES="-v SMS_HOSTNAME:http://localhost -v SMS_PORT:10443" +ROBOT_VARIABLES="-v SMS_HOSTNAME:http://${SMS_IP} -v SMS_PORT:10443" echo ${ROBOT_VARIABLES} -- cgit 1.2.3-korg