Bin Yang | c792afa | 2017-09-15 13:35:44 +0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # Copyright (c) 2017 Wind River Systems, Inc. |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at: |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | |
Victor Morales | 165e6d0 | 2018-04-23 17:13:26 -0700 | [diff] [blame^] | 14 | pushd ${SCRIPTS} |
Bin Yang | c792afa | 2017-09-15 13:35:44 +0800 | [diff] [blame] | 15 | |
| 16 | # start multicloud-ocata |
Victor Morales | 165e6d0 | 2018-04-23 17:13:26 -0700 | [diff] [blame^] | 17 | ./run-instance.sh nexus3.onap.org:10001/onap/multicloud/openstack-ocata:latest multicloud-ocata |
| 18 | SERVICE_IP=$(./get-instance-ip.sh multicloud-ocata) |
Bin Yang | 20d34c6 | 2017-09-21 17:38:46 +0800 | [diff] [blame] | 19 | SERVICE_PORT=9006 |
Victor Morales | 165e6d0 | 2018-04-23 17:13:26 -0700 | [diff] [blame^] | 20 | popd |
| 21 | |
| 22 | if [[ $no_proxy && $no_proxy != *$SERVICE_IP* ]]; then |
| 23 | export no_proxy+=$no_proxy,$SERVICE_IP |
| 24 | fi |
Bin Yang | c792afa | 2017-09-15 13:35:44 +0800 | [diff] [blame] | 25 | |
| 26 | for i in {1..50}; do |
| 27 | curl -sS ${SERVICE_IP}:${SERVICE_PORT} && break |
| 28 | echo sleep $i |
| 29 | sleep $i |
| 30 | done |
| 31 | |
Bin Yang | c792afa | 2017-09-15 13:35:44 +0800 | [diff] [blame] | 32 | # Pass any variables required by Robot test suites in ROBOT_VARIABLES |
| 33 | ROBOT_VARIABLES+="-v SERVICE_IP:${SERVICE_IP} " |
| 34 | ROBOT_VARIABLES+="-v SERVICE_PORT:${SERVICE_PORT} " |