blob: bb8a8e95fdfd82075491386041fbead61454edaf [file] [log] [blame]
Gary Wu9abb61c2018-09-27 10:38:50 -07001#!/bin/bash
2
3source ${SCRIPTS}/common_functions.sh
4
5export PRH_SERVICE="prh"
6export DMAAP_SIMULATOR="dmaap_simulator"
7export AAI_SIMULATOR="aai_simulator"
8
Gary Wu13111e92018-09-27 11:31:33 -07009cd ${WORKSPACE}/tests/dcaegen2/prh-testcases/resources/
Gary Wu9abb61c2018-09-27 10:38:50 -070010
Remigiusz Janeczekee726142021-08-25 13:29:02 +020011#Prepare PRH config volume
12mkdir prh_configs/prh_config_volume
13cp prh_configs/prh-config.yaml prh_configs/prh_config_volume/application_config.yaml
14
Gary Wu9abb61c2018-09-27 10:38:50 -070015pip uninstall -y docker-py
16pip uninstall -y docker
17pip install -U docker
Marcin Migdalfba99a52019-04-15 14:36:45 +020018
kurczews636b3972019-04-16 12:03:41 +020019set -e
20
21docker login -u docker -p docker https://nexus3.onap.org:10001
Gary Wu9abb61c2018-09-27 10:38:50 -070022docker-compose up -d --build
23
Marcin Migdal26125b12019-04-11 16:17:18 +020024# Extract docker images IPs
Gary Wu9abb61c2018-09-27 10:38:50 -070025PRH_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${PRH_SERVICE})
26DMAAP_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${DMAAP_SIMULATOR})
27AAI_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${AAI_SIMULATOR})
28
29bypass_ip_adress ${PRH_IP}
30bypass_ip_adress ${DMAAP_SIMULATOR_IP}
31bypass_ip_adress ${AAI_SIMULATOR_IP}
32
33echo PRH_IP=${PRH_IP}
34echo DMAAP_SIMULATOR_IP=${DMAAP_SIMULATOR_IP}
35echo AAI_SIMULATOR_IP=${AAI_SIMULATOR_IP}
36
37# Wait for initialization of PRH services
pkarasc7abba82018-10-22 12:22:35 +020038wait_for_service_init localhost:8100/heartbeat
Gary Wu9abb61c2018-09-27 10:38:50 -070039
40# #Pass any variables required by Robot test suites in ROBOT_VARIABLES
Remigiusz Janeczekee726142021-08-25 13:29:02 +020041ROBOT_VARIABLES="-v DMAAP_SIMULATOR_SETUP:${DMAAP_SIMULATOR_IP}:2224 -v AAI_SIMULATOR_SETUP:${AAI_SIMULATOR_IP}:3335 -v PRH_SETUP:${PRH_IP}:8100"