[DCAE-PMSH] Removing dmaap mr from suite
[integration/csit.git] / plans / dcaegen2-services-pmsh / testsuite / setup.sh
index 73a219f..a970c36 100644 (file)
@@ -5,7 +5,7 @@ export DB_PASSWORD=pmsh
 
 TEST_PLANS_DIR=$WORKSPACE/plans/dcaegen2-services-pmsh/testsuite
 
-docker-compose -f ${TEST_PLANS_DIR}/docker-compose.yml up -d zookeeper kafka dmaap-mr db aai cbs-sim
+docker-compose -f ${TEST_PLANS_DIR}/docker-compose.yml up -d db aai 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..."
@@ -21,20 +21,6 @@ for i in {1..30}; do
 done
 [[ "$db_response" != "0" ]] && echo "Error: postgres db not accessible" && exit 1
 
-DMAAP_MR_IP=$(docker inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" dmaap-mr)
-
-echo "Waiting for dmaap-message-router to come up ..."
-for i in {1..20}; do
-    dmaap_state=$(curl --write-out '%{http_code}' --silent --output /dev/null $DMAAP_MR_IP:3904/topics)
-    if [[ ${dmaap_state} == "200" ]]
-    then
-      break
-    else
-      sleep 5
-    fi
-done
-[[ "$dmaap_state" != "200" ]] && echo "Error: DMaaP MR container state not healthy" && exit 1
-
 docker-compose -f ${TEST_PLANS_DIR}/docker-compose.yml up -d pmsh
 
 PMSH_IP=$(docker inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" pmsh)
@@ -95,6 +81,7 @@ for i in {0..5}; do
     fi
     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
@@ -103,14 +90,9 @@ for i in {0..5}; do
 done
 [[ "$containers_ok" == "false" ]] && echo "Error: required container not running." && exit 1
 
-# Create topics on MR
-curl -X POST http://${DMAAP_MR_IP}:3904/events/AAI_EVENT --header 'Content-Type: application/json' --data-raw '{"message": "dummy message"}'
-sleep 2
-curl -X POST http://${DMAAP_MR_IP}:3904/events/unauthenticated.PMSH_CL_INPUT --header 'Content-Type: application/json' --data-raw '{"message": "dummy message"}'
-
-
 DB_IP_ADDRESS=$(docker inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" db)
 CBS_SIM_IP_ADDRESS=$(docker inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" cbs-sim)
+MR_SIM_IP_ADDRESS=$(docker inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" mr-sim)
 
 #Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v PMSH_IP:${PMSH_IP} -v MR_IP_ADDRESS:${DMAAP_MR_IP} -v DB_IP_ADDRESS:${DB_IP_ADDRESS} -v CBS_SIM_IP_ADDRESS:${CBS_SIM_IP_ADDRESS}"
+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}"