Refactor Multicloud-ocata CSIT
The setup.sh wasn't using a generic script for starting its services
and it was lacking of proxy support. This change fixes those things
refactoring its code.
Change-Id: I7cbe7df81a4b136ecdcd5d4cee004341e110b4c6
Signed-off-by: Victor Morales <victor.morales@intel.com>
Issue-ID: MULTICLOUD-214
diff --git a/test/csit/plans/multicloud-ocata/functionality1/setup.sh b/test/csit/plans/multicloud-ocata/functionality1/setup.sh
index 7541178..b674fa6 100644
--- a/test/csit/plans/multicloud-ocata/functionality1/setup.sh
+++ b/test/csit/plans/multicloud-ocata/functionality1/setup.sh
@@ -11,16 +11,17 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#
-# Place the scripts in run order:
-# Start all process required for executing test case
-
-source ${SCRIPTS}/common_functions.sh
+pushd ${SCRIPTS}
# 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`
+./run-instance.sh nexus3.onap.org:10001/onap/multicloud/openstack-ocata:latest multicloud-ocata
+SERVICE_IP=$(./get-instance-ip.sh multicloud-ocata)
SERVICE_PORT=9006
+popd
+
+if [[ $no_proxy && $no_proxy != *$SERVICE_IP* ]]; then
+ export no_proxy+=$no_proxy,$SERVICE_IP
+fi
for i in {1..50}; do
curl -sS ${SERVICE_IP}:${SERVICE_PORT} && break
@@ -28,7 +29,6 @@
sleep $i
done
-echo SCRIPTS
# Pass any variables required by Robot test suites in ROBOT_VARIABLES
ROBOT_VARIABLES+="-v SERVICE_IP:${SERVICE_IP} "
ROBOT_VARIABLES+="-v SERVICE_PORT:${SERVICE_PORT} "