wejs | 060bc42 | 2018-05-25 13:58:11 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | source ${SCRIPTS}/common_functions.sh |
| 4 | |
| 5 | export PRH_SERVICE="prh" |
| 6 | export DMAAP_SIMULATOR="dmaap_simulator" |
Mariusz Wagner | 4a6ece4 | 2018-06-05 15:54:27 +0200 | [diff] [blame] | 7 | export AAI_SIMULATOR="aai_simulator" |
wejs | 060bc42 | 2018-05-25 13:58:11 +0200 | [diff] [blame] | 8 | |
Mariusz Wagner | 26b89ec | 2018-06-19 09:52:01 +0200 | [diff] [blame] | 9 | cd ${WORKSPACE}/test/csit/tests/dcaegen2/prh-testcases/resources/ |
wejs | 060bc42 | 2018-05-25 13:58:11 +0200 | [diff] [blame] | 10 | |
Mariusz Wagner | 7a1e0c8 | 2018-07-31 09:32:05 +0200 | [diff] [blame] | 11 | pip uninstall -y docker-py |
| 12 | pip uninstall -y docker |
| 13 | pip install -U docker |
Mariusz Wagner | 4a6ece4 | 2018-06-05 15:54:27 +0200 | [diff] [blame] | 14 | docker-compose up -d --build |
wejs | 060bc42 | 2018-05-25 13:58:11 +0200 | [diff] [blame] | 15 | |
wejs | 060bc42 | 2018-05-25 13:58:11 +0200 | [diff] [blame] | 16 | PRH_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${PRH_SERVICE}) |
| 17 | DMAAP_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${DMAAP_SIMULATOR}) |
Mariusz Wagner | 4a6ece4 | 2018-06-05 15:54:27 +0200 | [diff] [blame] | 18 | AAI_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${AAI_SIMULATOR}) |
wejs | 060bc42 | 2018-05-25 13:58:11 +0200 | [diff] [blame] | 19 | |
| 20 | bypass_ip_adress ${PRH_IP} |
| 21 | bypass_ip_adress ${DMAAP_SIMULATOR_IP} |
Mariusz Wagner | 4a6ece4 | 2018-06-05 15:54:27 +0200 | [diff] [blame] | 22 | bypass_ip_adress ${AAI_SIMULATOR_IP} |
wejs | 060bc42 | 2018-05-25 13:58:11 +0200 | [diff] [blame] | 23 | |
| 24 | echo PRH_IP=${PRH_IP} |
| 25 | echo DMAAP_SIMULATOR_IP=${DMAAP_SIMULATOR_IP} |
Mariusz Wagner | 4a6ece4 | 2018-06-05 15:54:27 +0200 | [diff] [blame] | 26 | echo AAI_SIMULATOR_IP=${AAI_SIMULATOR_IP} |
wejs | 060bc42 | 2018-05-25 13:58:11 +0200 | [diff] [blame] | 27 | |
Mariusz Wagner | 7a1e0c8 | 2018-07-31 09:32:05 +0200 | [diff] [blame] | 28 | # Wait for initialization of PRH services |
Mariusz Wagner | 60be36d | 2018-07-05 11:32:51 +0200 | [diff] [blame] | 29 | for i in {1..10}; do |
wejs | 060bc42 | 2018-05-25 13:58:11 +0200 | [diff] [blame] | 30 | curl -sS -m 1 localhost:8100/heartbeat && break |
| 31 | echo sleep ${i} |
| 32 | sleep ${i} |
| 33 | done |
| 34 | |
Mariusz Wagner | 60be36d | 2018-07-05 11:32:51 +0200 | [diff] [blame] | 35 | # #Pass any variables required by Robot test suites in ROBOT_VARIABLES |
| 36 | ROBOT_VARIABLES="-v DMAAP_SIMULATOR:${DMAAP_SIMULATOR_IP}:2222 -v AAI_SIMULATOR:${AAI_SIMULATOR_IP}:3333 -v PRH:${PRH_IP}:8100" |