Stavros Kanarakis | 40c1ddc | 2019-03-27 19:11:43 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | source ${SCRIPTS}/common_functions.sh |
| 4 | |
| 5 | export BBS_SERVICE="bbs" |
| 6 | # export SSL_BBS_SERVICE="ssl_bbs" |
| 7 | export DMAAP_SIMULATOR="dmaap_simulator" |
| 8 | export AAI_SIMULATOR="aai_simulator" |
| 9 | |
| 10 | cd ${WORKSPACE}/tests/dcaegen2/bbs-testcases/resources/ |
| 11 | |
| 12 | pip uninstall -y docker-py |
| 13 | pip uninstall -y docker |
| 14 | pip install -U docker==2.7.0 |
| 15 | docker-compose up -d --build |
| 16 | |
| 17 | BBS_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${BBS_SERVICE}) |
| 18 | # SSL_BBS_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${SSL_BBS_SERVICE}) |
| 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 ${BBS_IP} |
| 23 | # bypass_ip_adress ${SSL_BBS_IP} |
| 24 | bypass_ip_adress ${DMAAP_SIMULATOR_IP} |
| 25 | bypass_ip_adress ${AAI_SIMULATOR_IP} |
| 26 | |
| 27 | echo BBS_IP=${BBS_IP} |
| 28 | # echo SSL_BBS_IP=${SSL_BBS_IP} |
| 29 | echo DMAAP_SIMULATOR_IP=${DMAAP_SIMULATOR_IP} |
| 30 | echo AAI_SIMULATOR_IP=${AAI_SIMULATOR_IP} |
| 31 | |
| 32 | # Wait for initialization of BBS services |
| 33 | # Same ports in the testcases docker compose |
| 34 | wait_for_service_init localhost:32100/heartbeat |
| 35 | #wait_for_service_init localhost:8200/heartbeat |
| 36 | |
| 37 | # #Pass any variables required by Robot test suites in ROBOT_VARIABLES |
| 38 | ROBOT_VARIABLES="-v DMAAP_SIMULATOR_SETUP:${DMAAP_SIMULATOR_IP}:2224 -v AAI_SIMULATOR_SETUP:${AAI_SIMULATOR_IP}:3335" |
| 39 | |