Refactor Multicloud-ocata CSIT 75/44275/1
authorVictor Morales <victor.morales@intel.com>
Tue, 24 Apr 2018 00:13:26 +0000 (17:13 -0700)
committerVictor Morales <victor.morales@intel.com>
Tue, 24 Apr 2018 00:13:26 +0000 (17:13 -0700)
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

test/csit/plans/multicloud-ocata/functionality1/setup.sh

index 7541178..b674fa6 100644 (file)
 # 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 @@ for i in {1..50}; do
     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} "