diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2018-04-04 18:54:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-04-04 18:54:34 +0000 |
commit | a88cb5d086f407a261cceb05d82266b7c59f9caa (patch) | |
tree | 346b4467df8ced521f2705e7f9b2f3cadbc475f0 /test | |
parent | ca219e0084b1f261aad8f72da159fe168545cf73 (diff) | |
parent | eaac220bb37ef8afe0be93553accb894997da8f6 (diff) |
Merge "Fixing broken CSIT by 40573"
Diffstat (limited to 'test')
-rwxr-xr-x | test/csit/plans/aaf/sms-test-plan/setup.sh | 40 | ||||
-rw-r--r-- | test/csit/plans/aaf/sms-test-plan/teardown.sh | 3 |
2 files changed, 29 insertions, 14 deletions
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} diff --git a/test/csit/plans/aaf/sms-test-plan/teardown.sh b/test/csit/plans/aaf/sms-test-plan/teardown.sh index 72f134f0d..d6fa32924 100644 --- a/test/csit/plans/aaf/sms-test-plan/teardown.sh +++ b/test/csit/plans/aaf/sms-test-plan/teardown.sh @@ -15,6 +15,9 @@ # limitations under the License. # +docker cp sms:/sms/sms.log . +cat sms.log +rm sms.log rm -rf config docker stop sms vault docker rm sms vault |