diff options
author | AndyWalshe <andy.walshe@est.tech> | 2020-03-12 12:52:19 +0000 |
---|---|---|
committer | AndyWalshe <andy.walshe@est.tech> | 2020-03-23 11:51:41 +0000 |
commit | 48496a511e8aa634c8b13ece136f7d63b659bdc1 (patch) | |
tree | 148171b72a37652900bd267fe2c0e40b1747e407 /plans/dcaegen2-services-pmsh/testsuite/setup.sh | |
parent | 940b6d936da7a3be6cfd5bd903ef40c6da9592ae (diff) |
Expand PMSH CSIT tests
Issue-ID: DCAEGEN2-1842
Signed-off-by: AndyWalshe <andy.walshe@est.tech>
Change-Id: Icc851f6606242350456c297220a13a806d5e0d95
Diffstat (limited to 'plans/dcaegen2-services-pmsh/testsuite/setup.sh')
-rw-r--r-- | plans/dcaegen2-services-pmsh/testsuite/setup.sh | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/plans/dcaegen2-services-pmsh/testsuite/setup.sh b/plans/dcaegen2-services-pmsh/testsuite/setup.sh index c70e02a1..5c599069 100644 --- a/plans/dcaegen2-services-pmsh/testsuite/setup.sh +++ b/plans/dcaegen2-services-pmsh/testsuite/setup.sh @@ -1,15 +1,12 @@ #!/bin/bash # Place the scripts in run order: -source ${SCRIPTS}/common_functions.sh export DB_USER=pmsh export DB_PASSWORD=pmsh -docker login -u docker -p docker nexus3.onap.org:10001 - TEST_PLANS_DIR=$WORKSPACE/plans/dcaegen2-services-pmsh/testsuite -docker-compose -f $TEST_PLANS_DIR/docker-compose.yml up -d mockserver db +docker-compose -f $TEST_PLANS_DIR/docker-compose.yml up -d db aai-sim cbs-sim mr-sim # Slow machine running CSITs can affect db coming up in time for PMSH echo "Waiting for postgres db to come up..." @@ -45,9 +42,11 @@ done # Wait for initialization of Docker containers containers_ok=false for i in {1..5}; do - if [ $(docker inspect --format '{{ .State.Running }}' mockserver) ] && \ - [ $(docker inspect --format '{{ .State.Running }}' db) ] && \ - [ $(docker inspect --format '{{ .State.Running }}' pmsh) ] + if [ $(docker inspect --format '{{ .State.Running }}' cbs-sim) ] && \ + [ $(docker inspect --format '{{ .State.Running }}' aai-sim) ] && \ + [ $(docker inspect --format '{{ .State.Running }}' mr-sim) ] && \ + [ $(docker inspect --format '{{ .State.Running }}' db) ] && \ + [ $(docker inspect --format '{{ .State.Running }}' pmsh) ] then echo "All required docker containers are up." containers_ok=true @@ -58,5 +57,9 @@ for i in {1..5}; do done [ "$containers_ok" = "false" ] && echo "Error: required container not running." && exit 1 +DB_IP_ADDRESS=$(docker inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" db) +MR_SIM_IP_ADDRESS=$(docker inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" mr-sim) +CBS_SIM_IP_ADDRESS=$(docker inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" cbs-sim) + #Pass any variables required by Robot test suites in ROBOT_VARIABLES -ROBOT_VARIABLES="-v PMSH_IP:${PMSH_IP}" +ROBOT_VARIABLES="-v PMSH_IP:${PMSH_IP} -v MR_SIM_IP_ADDRESS:${MR_SIM_IP_ADDRESS} -v DB_IP_ADDRESS:${DB_IP_ADDRESS} -v CBS_SIM_IP_ADDRESS:${CBS_SIM_IP_ADDRESS}" |