blob: 00892d6b33d5ebd1e3fdcf217651be4f413fbc05 [file] [log] [blame]
Gary Wu9abb61c2018-09-27 10:38:50 -07001#!/bin/bash
2
3source ${SCRIPTS}/common_functions.sh
4
5export PRH_SERVICE="prh"
6export DMAAP_SIMULATOR="dmaap_simulator"
7export AAI_SIMULATOR="aai_simulator"
8
Gary Wu13111e92018-09-27 11:31:33 -07009cd ${WORKSPACE}/tests/dcaegen2/prh-testcases/resources/
Gary Wu9abb61c2018-09-27 10:38:50 -070010
11pip uninstall -y docker-py
12pip uninstall -y docker
13pip install -U docker
14docker-compose up -d --build
15
16PRH_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${PRH_SERVICE})
17DMAAP_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${DMAAP_SIMULATOR})
18AAI_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${AAI_SIMULATOR})
19
20bypass_ip_adress ${PRH_IP}
21bypass_ip_adress ${DMAAP_SIMULATOR_IP}
22bypass_ip_adress ${AAI_SIMULATOR_IP}
23
24echo PRH_IP=${PRH_IP}
25echo DMAAP_SIMULATOR_IP=${DMAAP_SIMULATOR_IP}
26echo AAI_SIMULATOR_IP=${AAI_SIMULATOR_IP}
27
28# Wait for initialization of PRH services
29for i in {1..10}; do
30 curl -sS -m 1 localhost:8100/heartbeat && break
31 echo sleep ${i}
32 sleep ${i}
33done
34
35# #Pass any variables required by Robot test suites in ROBOT_VARIABLES
36ROBOT_VARIABLES="-v DMAAP_SIMULATOR:${DMAAP_SIMULATOR_IP}:2222 -v AAI_SIMULATOR:${AAI_SIMULATOR_IP}:3333 -v PRH:${PRH_IP}:8100"