blob: 52167bf5c418145c0641fd7e0d995d840c1841dc [file] [log] [blame]
wejs060bc422018-05-25 13:58:11 +02001#!/bin/bash
2
3source ${SCRIPTS}/common_functions.sh
4
5export PRH_SERVICE="prh"
6export DMAAP_SIMULATOR="dmaap_simulator"
Mariusz Wagner4a6ece42018-06-05 15:54:27 +02007export AAI_SIMULATOR="aai_simulator"
wejs060bc422018-05-25 13:58:11 +02008
Mariusz Wagner26b89ec2018-06-19 09:52:01 +02009cd ${WORKSPACE}/test/csit/tests/dcaegen2/prh-testcases/resources/
wejs060bc422018-05-25 13:58:11 +020010
Mariusz Wagner7a1e0c82018-07-31 09:32:05 +020011pip uninstall -y docker-py
12pip uninstall -y docker
13pip install -U docker
Mariusz Wagner4a6ece42018-06-05 15:54:27 +020014docker-compose up -d --build
wejs060bc422018-05-25 13:58:11 +020015
wejs060bc422018-05-25 13:58:11 +020016PRH_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${PRH_SERVICE})
17DMAAP_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${DMAAP_SIMULATOR})
Mariusz Wagner4a6ece42018-06-05 15:54:27 +020018AAI_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${AAI_SIMULATOR})
wejs060bc422018-05-25 13:58:11 +020019
20bypass_ip_adress ${PRH_IP}
21bypass_ip_adress ${DMAAP_SIMULATOR_IP}
Mariusz Wagner4a6ece42018-06-05 15:54:27 +020022bypass_ip_adress ${AAI_SIMULATOR_IP}
wejs060bc422018-05-25 13:58:11 +020023
24echo PRH_IP=${PRH_IP}
25echo DMAAP_SIMULATOR_IP=${DMAAP_SIMULATOR_IP}
Mariusz Wagner4a6ece42018-06-05 15:54:27 +020026echo AAI_SIMULATOR_IP=${AAI_SIMULATOR_IP}
wejs060bc422018-05-25 13:58:11 +020027
Mariusz Wagner7a1e0c82018-07-31 09:32:05 +020028# Wait for initialization of PRH services
Mariusz Wagner60be36d2018-07-05 11:32:51 +020029for i in {1..10}; do
wejs060bc422018-05-25 13:58:11 +020030 curl -sS -m 1 localhost:8100/heartbeat && break
31 echo sleep ${i}
32 sleep ${i}
33done
34
Mariusz Wagner60be36d2018-07-05 11:32:51 +020035# #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"