blob: 9551ce43123718cb63835bfe195815ae549d710a [file] [log] [blame]
Stavros Kanarakis40c1ddc2019-03-27 19:11:43 +02001#!/bin/bash
2
3source ${SCRIPTS}/common_functions.sh
4
5export BBS_SERVICE="bbs"
6# export SSL_BBS_SERVICE="ssl_bbs"
7export DMAAP_SIMULATOR="dmaap_simulator"
8export AAI_SIMULATOR="aai_simulator"
9
10cd ${WORKSPACE}/tests/dcaegen2/bbs-testcases/resources/
11
12pip uninstall -y docker-py
13pip uninstall -y docker
14pip install -U docker==2.7.0
15docker-compose up -d --build
16
17BBS_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})
19DMAAP_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${DMAAP_SIMULATOR})
20AAI_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${AAI_SIMULATOR})
21
22bypass_ip_adress ${BBS_IP}
23# bypass_ip_adress ${SSL_BBS_IP}
24bypass_ip_adress ${DMAAP_SIMULATOR_IP}
25bypass_ip_adress ${AAI_SIMULATOR_IP}
26
27echo BBS_IP=${BBS_IP}
28# echo SSL_BBS_IP=${SSL_BBS_IP}
29echo DMAAP_SIMULATOR_IP=${DMAAP_SIMULATOR_IP}
30echo AAI_SIMULATOR_IP=${AAI_SIMULATOR_IP}
31
32# Wait for initialization of BBS services
33# Same ports in the testcases docker compose
34wait_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
38ROBOT_VARIABLES="-v DMAAP_SIMULATOR_SETUP:${DMAAP_SIMULATOR_IP}:2224 -v AAI_SIMULATOR_SETUP:${AAI_SIMULATOR_IP}:3335"
39