Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | source ${SCRIPTS}/common_functions.sh |
| 4 | |
| 5 | export PRH_SERVICE="prh" |
pkaras | 55d3686 | 2018-10-17 15:08:34 +0200 | [diff] [blame] | 6 | export SSL_PRH_SERVICE="ssl_prh" |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 7 | export DMAAP_SIMULATOR="dmaap_simulator" |
| 8 | export AAI_SIMULATOR="aai_simulator" |
| 9 | |
Gary Wu | 13111e9 | 2018-09-27 11:31:33 -0700 | [diff] [blame] | 10 | cd ${WORKSPACE}/tests/dcaegen2/prh-testcases/resources/ |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 11 | |
| 12 | pip uninstall -y docker-py |
| 13 | pip uninstall -y docker |
| 14 | pip install -U docker |
| 15 | docker-compose up -d --build |
| 16 | |
| 17 | PRH_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${PRH_SERVICE}) |
pkaras | 55d3686 | 2018-10-17 15:08:34 +0200 | [diff] [blame] | 18 | SSL_PRH_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${SSL_PRH_SERVICE}) |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 19 | DMAAP_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${DMAAP_SIMULATOR}) |
| 20 | AAI_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${AAI_SIMULATOR}) |
| 21 | |
| 22 | bypass_ip_adress ${PRH_IP} |
pkaras | 55d3686 | 2018-10-17 15:08:34 +0200 | [diff] [blame] | 23 | bypass_ip_adress ${SSL_PRH_IP} |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 24 | bypass_ip_adress ${DMAAP_SIMULATOR_IP} |
| 25 | bypass_ip_adress ${AAI_SIMULATOR_IP} |
| 26 | |
| 27 | echo PRH_IP=${PRH_IP} |
pkaras | 55d3686 | 2018-10-17 15:08:34 +0200 | [diff] [blame] | 28 | echo SSL_PRH_IP=${SSL_PRH_IP} |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 29 | echo DMAAP_SIMULATOR_IP=${DMAAP_SIMULATOR_IP} |
| 30 | echo AAI_SIMULATOR_IP=${AAI_SIMULATOR_IP} |
| 31 | |
| 32 | # Wait for initialization of PRH services |
pkaras | c7abba8 | 2018-10-22 12:22:35 +0200 | [diff] [blame] | 33 | wait_for_service_init localhost:8100/heartbeat |
| 34 | wait_for_service_init localhost:8200/heartbeat |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 35 | |
| 36 | # #Pass any variables required by Robot test suites in ROBOT_VARIABLES |
pkaras | c7abba8 | 2018-10-22 12:22:35 +0200 | [diff] [blame] | 37 | ROBOT_VARIABLES="-v DMAAP_SIMULATOR_SETUP:${DMAAP_SIMULATOR_IP}:2224 -v AAI_SIMULATOR_SETUP:${AAI_SIMULATOR_IP}:3335" |
pkaras | 55d3686 | 2018-10-17 15:08:34 +0200 | [diff] [blame] | 38 | |