aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/plans/cli/sanity-check
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2017-09-22 04:49:16 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-22 04:49:16 +0000
commitd88b9ded9433cfce5c49c0db970424eeb6d4c165 (patch)
tree9eaf75f233302616c81aa597fa83d31e478f67aa /test/csit/plans/cli/sanity-check
parentbb4b73d866eb3f1402263ce47e435592ff1399db (diff)
parent7ef7385913a91737db03646aaa8efd5accabca13 (diff)
Merge "CSIT test cases for MSB command integration"
Diffstat (limited to 'test/csit/plans/cli/sanity-check')
-rw-r--r--test/csit/plans/cli/sanity-check/setup.sh27
-rw-r--r--test/csit/plans/cli/sanity-check/teardown.sh2
2 files changed, 26 insertions, 3 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}"
diff --git a/test/csit/plans/cli/sanity-check/teardown.sh b/test/csit/plans/cli/sanity-check/teardown.sh
index 70fb6ff18..2135d001e 100644
--- a/test/csit/plans/cli/sanity-check/teardown.sh
+++ b/test/csit/plans/cli/sanity-check/teardown.sh
@@ -14,4 +14,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-kill-instance.sh cli \ No newline at end of file
+kill-instance.sh cli msb_consul msb_discovery msb_internal_apigateway