aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/plans
diff options
context:
space:
mode:
Diffstat (limited to 'test/csit/plans')
-rwxr-xr-xtest/csit/plans/appc/healthcheck/bundle_query.sh4
-rwxr-xr-xtest/csit/plans/appc/healthcheck/db_query.sh24
-rwxr-xr-xtest/csit/plans/appc/healthcheck/setup.sh30
-rw-r--r--test/csit/plans/appc/healthcheck/testplan.txt1
-rw-r--r--test/csit/plans/cli/sanity-check/setup.sh27
-rw-r--r--test/csit/plans/cli/sanity-check/teardown.sh2
-rwxr-xr-xtest/csit/plans/dcae/testsuites/setup.sh38
-rwxr-xr-xtest/csit/plans/dcae/testsuites/teardown.sh18
-rwxr-xr-xtest/csit/plans/dcae/testsuites/testplan.txt3
-rwxr-xr-xtest/csit/plans/dmaap/mrpubsub/setup.sh95
-rwxr-xr-xtest/csit/plans/dmaap/mrpubsub/teardown.sh22
-rw-r--r--test/csit/plans/dmaap/mrpubsub/testplan.txt2
-rw-r--r--test/csit/plans/multicloud-ocata/functionality1/setup.sh2
-rw-r--r--test/csit/plans/sdc/healthCheck/setup.sh33
-rw-r--r--test/csit/plans/sdc/healthCheck/teardown.sh22
-rw-r--r--test/csit/plans/sdc/healthCheck/testplan.txt3
-rw-r--r--test/csit/plans/sdnc/healthcheck/health_check.sh28
-rw-r--r--test/csit/plans/sdnc/healthcheck/setup.sh118
-rw-r--r--test/csit/plans/sdnc/healthcheck/teardown.sh25
-rw-r--r--test/csit/plans/sdnc/healthcheck/testplan.txt4
-rw-r--r--test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/setup.sh2
-rw-r--r--test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh6
-rw-r--r--test/csit/plans/vnfsdk-refrepo/sanity-check/teardown.sh2
23 files changed, 482 insertions, 29 deletions
diff --git a/test/csit/plans/appc/healthcheck/bundle_query.sh b/test/csit/plans/appc/healthcheck/bundle_query.sh
index 7224ae9c5..f163ce5c2 100755
--- a/test/csit/plans/appc/healthcheck/bundle_query.sh
+++ b/test/csit/plans/appc/healthcheck/bundle_query.sh
@@ -24,8 +24,8 @@ failed_bundles=$(docker exec appc_controller_container /opt/opendaylight/current
echo "There are $num_failed_bundles failed bundles out of $num_bundles installed bundles."
-if [ "$num_failed_bundles" -ge 1 ] || [ $num_bundles -le 393 ]; then
- echo "There are $num_bundles bundles out of 394 with $num_failed_bundles in a failed state. "
+if [ "$num_failed_bundles" -ge 1 ] || [ $num_bundles -le 400 ]; then
+ echo "There are $num_bundles bundles with $num_failed_bundles in a failed state. "
echo "The following bundle(s) are in a failed state: "
echo " $failed_bundles"
exit 1;
diff --git a/test/csit/plans/appc/healthcheck/db_query.sh b/test/csit/plans/appc/healthcheck/db_query.sh
index 87e0ac397..70829a13a 100755
--- a/test/csit/plans/appc/healthcheck/db_query.sh
+++ b/test/csit/plans/appc/healthcheck/db_query.sh
@@ -41,20 +41,20 @@ else
exit 1;
fi
-if [ "$NODE_TYPES" -eq "0" ]; then
- echo "There is no data in table NODE_TYPES. "
- exit 1;
-fi
+#if [ "$NODE_TYPES" -eq "0" ]; then
+# echo "There is no data in table NODE_TYPES. "
+# exit 1;
+#fi
-if [ "$SVC_LOGIC" -eq "0" ] ; then
- echo "There is no data in table SVC_LOGIC. "
- exit 1;
-fi
+#if [ "$SVC_LOGIC" -eq "0" ] ; then
+# echo "There is no data in table SVC_LOGIC. "
+# exit 1;
+#fi
-if [ "$VNF_DG_MAPPING" -eq "0" ]; then
- echo "There is no data in table VNF_DG_MAPPING. "
- exit 1;
-fi
+#if [ "$VNF_DG_MAPPING" -eq "0" ]; then
+# echo "There is no data in table VNF_DG_MAPPING. "
+# exit 1;
+#fi
echo "Expected table data is present."
exit 0 )
diff --git a/test/csit/plans/appc/healthcheck/setup.sh b/test/csit/plans/appc/healthcheck/setup.sh
index 3c57cefac..eaf488a65 100755
--- a/test/csit/plans/appc/healthcheck/setup.sh
+++ b/test/csit/plans/appc/healthcheck/setup.sh
@@ -20,6 +20,12 @@
SCRIPTS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source ${WORKSPACE}/test/csit/scripts/appc/script1.sh
+export NEXUS_USERNAME=docker
+export NEXUS_PASSWD=docker
+export NEXUS_DOCKER_REPO=nexus3.onap.org:10001
+export DMAAP_TOPIC=AUTO
+export DOCKER_IMAGE_VERSION=1.1.0-SNAPSHOT-latest
+
export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
if [ "$MTU" == "" ]; then
@@ -36,14 +42,14 @@ git pull
unset http_proxy https_proxy
cd $WORKSPACE/archives/appc/docker-compose
-sed -i "s/DMAAP_TOPIC_ENV=.*/DMAAP_TOPIC_ENV="AUTO"/g" docker-compose.yml
-docker login -u docker -p docker nexus3.onap.org:10001
+sed -i "s/DMAAP_TOPIC_ENV=.*/DMAAP_TOPIC_ENV="$DMAAP_TOPIC"/g" docker-compose.yml
+docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
-docker pull nexus3.onap.org:10001/openecomp/appc-image:1.1-STAGING-latest
-docker tag nexus3.onap.org:10001/openecomp/appc-image:1.1-STAGING-latest openecomp/appc-image:latest
+docker pull $NEXUS_DOCKER_REPO/openecomp/appc-image:$DOCKER_IMAGE_VERSION
+docker tag $NEXUS_DOCKER_REPO/openecomp/appc-image:$DOCKER_IMAGE_VERSION openecomp/appc-image:latest
-docker pull nexus3.onap.org:10001/openecomp/dgbuilder-sdnc-image:1.1-STAGING-latest
-docker tag nexus3.onap.org:10001/openecomp/dgbuilder-sdnc-image:1.1-STAGING-latest openecomp/dgbuilder-sdnc-image:latest
+docker pull $NEXUS_DOCKER_REPO/onap/ccsdk-dgbuilder-image:latest
+docker tag $NEXUS_DOCKER_REPO/onap/ccsdk-dgbuilder-image:latest onap/ccsdk-dgbuilder-image:latest
# start APPC containers with docker compose and configuration from docker-compose.yml
docker-compose up -d
@@ -71,7 +77,7 @@ fi
#sleep 800
-TIME_OUT=1500
+TIME_OUT=1000
INTERVAL=60
TIME=0
while [ "$TIME" -lt "$TIME_OUT" ]; do
@@ -79,7 +85,7 @@ while [ "$TIME" -lt "$TIME_OUT" ]; do
response=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf system:start-level)
num_bundles=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | tail -1 | cut -d\| -f1)
- if [ "$response" == "Level 100" ] && [ "$num_bundles" -ge 394 ]; then
+ if [ "$response" == "Level 100" ] && [ "$num_bundles" -ge 400 ]; then
echo APPC karaf started in $TIME seconds
break;
fi
@@ -96,7 +102,7 @@ fi
response=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf system:start-level)
num_bundles=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | tail -1 | cut -d\| -f1)
- if [ "$response" == "Level 100" ] && [ "$num_bundles" -ge 394 ]; then
+ if [ "$response" == "Level 100" ] && [ "$num_bundles" -ge 400 ]; then
num_bundles=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | tail -1 | cut -d\| -f1)
num_failed_bundles=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | grep Failure | wc -l)
failed_bundles=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | grep Failure)
@@ -111,3 +117,9 @@ fi
# Pass any variables required by Robot test suites in ROBOT_VARIABLES
ROBOT_VARIABLES="-v SCRIPTS:${SCRIPTS}"
+if [ "$response" == "" ] || [ "$num_bundles" == "" ]; then
+ echo "Docker container appc_controller_container is not available. Exiting."
+ exit 1
+fi
+
+
diff --git a/test/csit/plans/appc/healthcheck/testplan.txt b/test/csit/plans/appc/healthcheck/testplan.txt
index 2a8c1ea84..fbf2319a7 100644
--- a/test/csit/plans/appc/healthcheck/testplan.txt
+++ b/test/csit/plans/appc/healthcheck/testplan.txt
@@ -1,4 +1,5 @@
# Test suites are relative paths under [integration.git]/test/csit/tests/.
# Place the suites in run order.
appc/healthcheck
+#appc/testsuite
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
diff --git a/test/csit/plans/dcae/testsuites/setup.sh b/test/csit/plans/dcae/testsuites/setup.sh
new file mode 100755
index 000000000..d7f02bcdf
--- /dev/null
+++ b/test/csit/plans/dcae/testsuites/setup.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+#
+# Copyright 2017 ZTE Corporation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Place the scripts in run order:
+#Make sure python-uuid is installed
+
+
+#get current host IP addres
+HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}')
+echo HOST_IP=${HOST_IP}
+
+VESC_IMAGE=nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.1
+echo VESC_IMAGE=${VESC_IMAGE}
+
+# Start DCAE VES Collector
+docker run -d -p 8080:8080/tcp -p 8443:8443/tcp -P --name vesc -e DMAAPHOST=${HOST_IP} ${VESC_IMAGE}
+
+VESC_IP=`get-instance-ip.sh vesc`
+export VESC_IP=${VESC_IP}
+
+export ROBOT_VARIABLES="--pythonpath ${WORKSPACE}/test/csit/tests/dcae/testcases/resources"
+
+# Wait container ready
+sleep 5
+
diff --git a/test/csit/plans/dcae/testsuites/teardown.sh b/test/csit/plans/dcae/testsuites/teardown.sh
new file mode 100755
index 000000000..2dc14870f
--- /dev/null
+++ b/test/csit/plans/dcae/testsuites/teardown.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+#
+# Copyright 2017 ZTE, Inc. and others.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+kill-instance.sh vesc \ No newline at end of file
diff --git a/test/csit/plans/dcae/testsuites/testplan.txt b/test/csit/plans/dcae/testsuites/testplan.txt
new file mode 100755
index 000000000..777842a3a
--- /dev/null
+++ b/test/csit/plans/dcae/testsuites/testplan.txt
@@ -0,0 +1,3 @@
+# Test suites are relative paths under [integration.git]/test/csit/tests/.
+# Place the suites in run order.
+dcae/testcases
diff --git a/test/csit/plans/dmaap/mrpubsub/setup.sh b/test/csit/plans/dmaap/mrpubsub/setup.sh
new file mode 100755
index 000000000..3e8950f2b
--- /dev/null
+++ b/test/csit/plans/dmaap/mrpubsub/setup.sh
@@ -0,0 +1,95 @@
+#!/bin/bash
+#
+# ============LICENSE_START=======================================================
+# ONAP DMAAP MR
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END============================================
+# ===================================================================
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+# Place the scripts in run order:
+source ${SCRIPTS}/common_functions.sh
+
+# Clone DMaaP Message Router repo
+mkdir -p $WORKSPACE/archives/dmaapmr
+cd $WORKSPACE/archives/dmaapmr
+#unset http_proxy https_proxy
+git clone --depth 1 http://gerrit.onap.org/r/dmaap/messagerouter/messageservice -b master
+git pull
+cd $WORKSPACE/archives/dmaapmr/messageservice/src/main/resources/docker-compose
+cp $WORKSPACE/archives/dmaapmr/messageservice/bundleconfig-local/etc/appprops/MsgRtrApi.properties /var/tmp/
+
+
+# start DMaaP MR containers with docker compose and configuration from docker-compose.yml
+docker-compose up -d
+
+# Wait for initialization of Docker contaienr for DMaaP MR, Kafka and Zookeeper
+for i in {1..50}; do
+ if [ $(docker inspect --format '{{ .State.Running }}' dockercompose_dmaap_1) ] && \
+ [ $(docker inspect --format '{{ .State.Running }}' dockercompose_zookeeper_1) ] && \
+ [ $(docker inspect --format '{{ .State.Running }}' dockercompose_dmaap_1) ]
+ then
+ echo "DMaaP Service Running"
+ break
+ else
+ echo sleep $i
+ sleep $i
+ fi
+done
+
+
+DMAAP_MR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' dockercompose_dmaap_1)
+KAFKA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' dockercompose_kafka_1)
+ZOOKEEPER_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' dockercompose_zookeeper_1)
+
+echo DMAAP_MR_IP=${DMAAP_MR_IP}
+echo KAFKA_IP=${KAFKA_IP}
+echo ZOOKEEPER_IP=${ZOOKEEPER_IP}
+
+# Initial docker-compose up and down is for populating kafka and zookeeper IPs in /var/tmp/MsgRtrApi.properites
+docker-compose down
+
+# Update kafkfa and zookeeper properties in MsgRtrApi.propeties which will be copied to DMaaP Container
+sed -i -e 's/<zookeeper_host>/'$ZOOKEEPER_IP'/' /var/tmp/MsgRtrApi.properties
+sed -i -e 's/<kafka_host>:<kafka_port>/'$KAFKA_IP':9092/' /var/tmp/MsgRtrApi.properties
+
+docker-compose build
+docker-compose up -d
+
+# Wait for initialization of Docker containers
+for i in {1..50}; do
+ if [ $(docker inspect --format '{{ .State.Running }}' dockercompose_dmaap_1) ] && \
+ [ $(docker inspect --format '{{ .State.Running }}' dockercompose_zookeeper_1) ] && \
+ [ $(docker inspect --format '{{ .State.Running }}' dockercompose_dmaap_1) ]
+ then
+ echo "DMaaP Service Running"
+ break
+ else
+ echo sleep $i
+ sleep $i
+ fi
+done
+
+# Wait for initialization of docker services
+for i in {1..50}; do
+ curl -sS -m 1 ${DMAAP_MR_IP}:3904/events/TestTopic && break
+ echo sleep $i
+ sleep $i
+done
+
+#Pass any variables required by Robot test suites in ROBOT_VARIABLES
+ROBOT_VARIABLES="-v DMAAP_MR_IP:${DMAAP_MR_IP}"
diff --git a/test/csit/plans/dmaap/mrpubsub/teardown.sh b/test/csit/plans/dmaap/mrpubsub/teardown.sh
new file mode 100755
index 000000000..1b4303240
--- /dev/null
+++ b/test/csit/plans/dmaap/mrpubsub/teardown.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+# Copyright 2016-2017 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Modifications copyright (c) 2017 AT&T Intellectual Property
+#
+
+kill-instance.sh dockercompose_dmaap_1
+kill-instance.sh dockercompose_kafka_1
+kill-instance.sh dockercompose_zookeeper_1
diff --git a/test/csit/plans/dmaap/mrpubsub/testplan.txt b/test/csit/plans/dmaap/mrpubsub/testplan.txt
new file mode 100644
index 000000000..6a98eb790
--- /dev/null
+++ b/test/csit/plans/dmaap/mrpubsub/testplan.txt
@@ -0,0 +1,2 @@
+# Place the suites in run order.
+dmaap/mrpubsub
diff --git a/test/csit/plans/multicloud-ocata/functionality1/setup.sh b/test/csit/plans/multicloud-ocata/functionality1/setup.sh
index 5630849cf..75411781e 100644
--- a/test/csit/plans/multicloud-ocata/functionality1/setup.sh
+++ b/test/csit/plans/multicloud-ocata/functionality1/setup.sh
@@ -20,7 +20,7 @@ source ${SCRIPTS}/common_functions.sh
# start multicloud-ocata
docker run -d --name multicloud-ocata nexus3.onap.org:10001/onap/multicloud/openstack-ocata
SERVICE_IP=`get-instance-ip.sh multicloud-ocata`
-SERVICE_PORT=9004
+SERVICE_PORT=9006
for i in {1..50}; do
curl -sS ${SERVICE_IP}:${SERVICE_PORT} && break
diff --git a/test/csit/plans/sdc/healthCheck/setup.sh b/test/csit/plans/sdc/healthCheck/setup.sh
new file mode 100644
index 000000000..f247be656
--- /dev/null
+++ b/test/csit/plans/sdc/healthCheck/setup.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+#
+# Copyright 2016-2017 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Modifications copyright (c) 2017 AT&T Intellectual Property
+#
+# Place the scripts in run order:
+
+
+source ${WORKSPACE}/test/csit/scripts/sdc/clone_and_setup_sdc_data.sh
+
+source ${WORKSPACE}/test/csit/scripts/sdc/start_sdc_containers.sh
+
+
+BE_IP=`get-instance-ip.sh sdc-BE`
+echo BE_IP=${BE_IP}
+
+
+# Pass any variables required by Robot test suites in ROBOT_VARIABLES
+ROBOT_VARIABLES="-v BE_IP:${BE_IP}"
+
diff --git a/test/csit/plans/sdc/healthCheck/teardown.sh b/test/csit/plans/sdc/healthCheck/teardown.sh
new file mode 100644
index 000000000..a5f69819e
--- /dev/null
+++ b/test/csit/plans/sdc/healthCheck/teardown.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+# Copyright 2016-2017 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Modifications copyright (c) 2017 AT&T Intellectual Property
+#
+
+source ${WORKSPACE}/test/csit/scripts/sdc/kill_containers_and_remove_dataFolders.sh
+
+# $WORKSPACE/archives/clamp-clone deleted with archives folder when tests starts so we keep it at the end for debugging
diff --git a/test/csit/plans/sdc/healthCheck/testplan.txt b/test/csit/plans/sdc/healthCheck/testplan.txt
new file mode 100644
index 000000000..2b2db1ede
--- /dev/null
+++ b/test/csit/plans/sdc/healthCheck/testplan.txt
@@ -0,0 +1,3 @@
+# Test suites are relative paths under [integration.git]/test/csit/tests/.
+# Place the suites in run order.
+sdc/healthCheck
diff --git a/test/csit/plans/sdnc/healthcheck/health_check.sh b/test/csit/plans/sdnc/healthcheck/health_check.sh
new file mode 100644
index 000000000..96c99848a
--- /dev/null
+++ b/test/csit/plans/sdnc/healthcheck/health_check.sh
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+###############################################################################
+# Copyright 2017 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###############################################################################
+SCRIPTS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+echo $SCRIPTS
+
+response=$(curl --write-out '%{http_code}' --silent --output /dev/null -H "Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==" -X POST -H "X-FromAppId: csit-sdnc" -H "X-TransactionId: csit-sdnc" -H "Accept: application/json" -H "Content-Type: application/json" http://localhost:8282/restconf/operations/SLI-API:healthcheck )
+
+if [ "$response" == "200" ]; then
+ echo "SDNC health check passed."
+ exit 0;
+fi
+
+echo "SDNC health check failed with response code ${response}."
+exit 1
diff --git a/test/csit/plans/sdnc/healthcheck/setup.sh b/test/csit/plans/sdnc/healthcheck/setup.sh
new file mode 100644
index 000000000..643d54fe9
--- /dev/null
+++ b/test/csit/plans/sdnc/healthcheck/setup.sh
@@ -0,0 +1,118 @@
+#!/bin/bash
+#
+# Copyright 2016-2017 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Modifications copyright (c) 2017 AT&T Intellectual Property
+#
+# Place the scripts in run order:
+SCRIPTS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+source ${WORKSPACE}/test/csit/scripts/sdnc/script1.sh
+
+export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
+
+if [ "$MTU" == "" ]; then
+ export MTU="1450"
+fi
+
+
+# Clone SDNC repo to get docker-compose for SDNC
+mkdir -p $WORKSPACE/archives/sdnc
+cd $WORKSPACE/archives
+git clone -b master --single-branch http://gerrit.onap.org/r/sdnc/oam.git sdnc
+cd $WORKSPACE/archives/sdnc
+git pull
+unset http_proxy https_proxy
+cd $WORKSPACE/archives/sdnc/installation/src/main/yaml
+
+sed -i "s/DMAAP_TOPIC_ENV=.*/DMAAP_TOPIC_ENV="AUTO"/g" docker-compose.yml
+docker login -u docker -p docker nexus3.onap.org:10001
+
+docker pull nexus3.onap.org:10001/onap/sdnc-image:latest
+docker tag nexus3.onap.org:10001/onap/sdnc-image:latest onap/sdnc-image:latest
+
+docker pull nexus3.onap.org:10001/onap/ccsdk-dgbuilder-image:latest
+docker tag nexus3.onap.org:10001/onap/ccsdk-dgbuilder-image:latest onap/ccsdk-dgbuilder-image:latest
+
+docker pull nexus3.onap.org:10001/onap/admportal-sdnc-image:latest
+docker tag nexus3.onap.org:10001/onap/admportal-sdnc-image:latest onap/admportal-sdnc-image:latest
+
+# start SDNC containers with docker compose and configuration from docker-compose.yml
+curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > docker-compose
+chmod +x docker-compose
+./docker-compose up -d
+
+# WAIT 5 minutes maximum and test every 5 seconds if SDNC is up using HealthCheck API
+TIME_OUT=500
+INTERVAL=30
+TIME=0
+while [ "$TIME" -lt "$TIME_OUT" ]; do
+ response=$(curl --write-out '%{http_code}' --silent --output /dev/null -H "Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==" -X POST -H "X-FromAppId: csit-sdnc" -H "X-TransactionId: csit-sdnc" -H "Accept: application/json" -H "Content-Type: application/json" http://localhost:8282/restconf/operations/SLI-API:healthcheck ); echo $response
+
+ if [ "$response" == "200" ]; then
+ echo SDNC started in $TIME seconds
+ break;
+ fi
+
+ echo Sleep: $INTERVAL seconds before testing if SDNC is up. 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: Docker containers not started in $TIME_OUT seconds... Could cause problems for testing activities...
+fi
+
+#sleep 800
+
+TIME_OUT=1500
+INTERVAL=60
+TIME=0
+while [ "$TIME" -lt "$TIME_OUT" ]; do
+
+response=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client -u karaf system:start-level)
+num_bundles=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | tail -1 | cut -d\| -f1)
+
+ if [ "$response" == "Level 100" ] && [ "$num_bundles" -ge 333 ]; then
+ echo SDNC karaf started in $TIME seconds
+ break;
+ fi
+
+ echo Sleep: $INTERVAL seconds before testing if SDNC is up. 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: karaf session not started in $TIME_OUT seconds... Could cause problems for testing activities...
+fi
+
+response=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client -u karaf system:start-level)
+num_bundles=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | tail -1 | cut -d\| -f1)
+
+ if [ "$response" == "Level 100" ] && [ "$num_bundles" -ge 333 ]; then
+ num_bundles=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | tail -1 | cut -d\| -f1)
+ num_failed_bundles=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | grep Failure | wc -l)
+ failed_bundles=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | grep Failure)
+ echo There is/are $num_failed_bundles failed bundles out of $num_bundles installed bundles.
+ fi
+
+if [ "$num_failed_bundles" -ge 1 ]; then
+ echo "The following bundle(s) are in a failed state: "
+ echo " $failed_bundles"
+fi
+
+# Pass any variables required by Robot test suites in ROBOT_VARIABLES
+ROBOT_VARIABLES="-v SCRIPTS:${SCRIPTS}"
+
diff --git a/test/csit/plans/sdnc/healthcheck/teardown.sh b/test/csit/plans/sdnc/healthcheck/teardown.sh
new file mode 100644
index 000000000..4d99b9f31
--- /dev/null
+++ b/test/csit/plans/sdnc/healthcheck/teardown.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# Copyright 2016-2017 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Modifications copyright (c) 2017 AT&T Intellectual Property
+#
+
+kill-instance.sh sdnc_controller_container
+kill-instance.sh sdnc_dgbuilder_container
+kill-instance.sh sdnc_portal_container
+kill-instance.sh sdnc_db_container
+
+# $WORKSPACE/archives/appc deleted with archives folder when tests starts so we keep it at the end for debugging
diff --git a/test/csit/plans/sdnc/healthcheck/testplan.txt b/test/csit/plans/sdnc/healthcheck/testplan.txt
new file mode 100644
index 000000000..3fa8dde53
--- /dev/null
+++ b/test/csit/plans/sdnc/healthcheck/testplan.txt
@@ -0,0 +1,4 @@
+# Test suites are relative paths under [integration.git]/test/csit/tests/.
+# Place the suites in run order.
+sdnc/healthcheck
+
diff --git a/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/setup.sh b/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/setup.sh
index 382cb7a8d..64fa5a4d0 100644
--- a/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/setup.sh
+++ b/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/setup.sh
@@ -64,4 +64,4 @@ for i in {1..10}; do
done
# Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v ZTEVMANAGERDRIVER_IP:${ZTEVMANAGERDRIVER_IP} -v MSB_IP:${MSB_IAG_IP} -v SERVICE_IP:${SERVICE_IP}"
+ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v ZTEVMANAGERDRIVER_IP:${ZTEVMANAGERDRIVER_IP} -v MSB_IP:${MSB_IAG_IP} -v SERVICE_IP:${SERVICE_IP} -v SCRIPTS:${SCRIPTS}"
diff --git a/test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh b/test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh
index 91e931e91..e04feac41 100644
--- a/test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh
+++ b/test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh
@@ -17,9 +17,13 @@
# These scripts are sourced by run-csit.sh.
+#Start postgres database
+docker run -d -i -t --name=postgres -p 5432:5432 nexus3.onap.org:10001/onap/refrepo/postgres:latest
+
+POSTGRES=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' postgres`
#Start market place
-docker run -d -i -t --name=refrepo -p 8702:8702 nexus3.onap.org:10001/onap/refrepo:1.0-STAGING-latest
+docker run -d -i -t --name=refrepo -e POSTGRES_IP=$POSTGRES -p 8702:8702 nexus3.onap.org:10001/onap/refrepo:1.0-STAGING-latest
# Wait for Market place initialization
echo Wait for VNF Repository initialization
diff --git a/test/csit/plans/vnfsdk-refrepo/sanity-check/teardown.sh b/test/csit/plans/vnfsdk-refrepo/sanity-check/teardown.sh
index a42634303..19440bc79 100644
--- a/test/csit/plans/vnfsdk-refrepo/sanity-check/teardown.sh
+++ b/test/csit/plans/vnfsdk-refrepo/sanity-check/teardown.sh
@@ -18,4 +18,6 @@
kill-instance.sh refrepo
+kill-instance.sh postgres
+