diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2017-09-22 04:49:16 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-09-22 04:49:16 +0000 |
commit | d88b9ded9433cfce5c49c0db970424eeb6d4c165 (patch) | |
tree | 9eaf75f233302616c81aa597fa83d31e478f67aa /test/csit/plans/cli/sanity-check/setup.sh | |
parent | bb4b73d866eb3f1402263ce47e435592ff1399db (diff) | |
parent | 7ef7385913a91737db03646aaa8efd5accabca13 (diff) |
Merge "CSIT test cases for MSB command integration"
Diffstat (limited to 'test/csit/plans/cli/sanity-check/setup.sh')
-rw-r--r-- | test/csit/plans/cli/sanity-check/setup.sh | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/test/csit/plans/cli/sanity-check/setup.sh b/test/csit/plans/cli/sanity-check/setup.sh index ca18f5176..d1d0ab6f0 100644 --- a/test/csit/plans/cli/sanity-check/setup.sh +++ b/test/csit/plans/cli/sanity-check/setup.sh @@ -17,7 +17,30 @@ # Place the scripts in run order: source ${SCRIPTS}/common_functions.sh -# Start auth +#start msb +docker run -d -p 8500:8500 --name msb_consul consul +MSB_CONSUL_IP=`get-instance-ip.sh msb_consul` +echo MSB_CONSUL_IP=${MSB_CONSUL_IP} + +docker run -d -p 10081:10081 -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery +MSB_DISCOVERY_IP=`get-instance-ip.sh msb_discovery` +echo DISCOVERY_IP=${MSB_DISCOVERY_IP} + +docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway +MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway` +echo MSB_IAG_IP=${MSB_IAG_IP} + +# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway) +for i in {1..10}; do + curl -sS -m 1 ${MSB_CONSUL_IP}:8500 && curl -sS -m 1 ${MSB_DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IAG_IP}:80 && break + echo sleep $i + sleep $i +done + +#Need some time for the initialization of MSB services +sleep 60 + +# Start cli docker run -d --name cli -e CLI_MODE=daemon nexus3.onap.org:10001/onap/cli:1.1-STAGING-latest # Wait for cli initialization @@ -29,4 +52,4 @@ done CLI_IP=`get-instance-ip.sh cli` # Pass any variables required by Robot test suites in ROBOT_VARIABLES -ROBOT_VARIABLES="-v CLI_IP:${CLI_IP}" +ROBOT_VARIABLES="-v CLI_IP:${CLI_IP} -v MSB_IAG_IP:${MSB_IAG_IP}" |