Added functional tests for unauthenticated MR

NOTE: because these tests are all related, this commit
also addresses DMAAP-294,495, 297, 301 and 302.

Change-Id: I862f459e34517c838413728e6193e53a5ab20bc3
Signed-off-by: Dominic Lunanuova <dgl@research.att.com>
Issue-ID: DMAAP-293
diff --git a/test/csit/plans/dmaap-buscontroller/with_mr/setup.sh b/test/csit/plans/dmaap-buscontroller/with_mr/setup.sh
index 35534de..3b604fe 100755
--- a/test/csit/plans/dmaap-buscontroller/with_mr/setup.sh
+++ b/test/csit/plans/dmaap-buscontroller/with_mr/setup.sh
@@ -20,25 +20,35 @@
 # 
 #
 
+if [ "$USE_EXISTING_DMAAP" = "Y" ]
+then
+	ROBOT_VARIABLES="-v AAF_IP:0.0.0 -v MRC_IP:172.18.0.3 -v DRPS_IP:0.0.0.0 -v DMAAPBC_IP:172.17.0.4"
+else
 
-# Place the scripts in run order:
-source ${WORKSPACE}/test/csit/scripts/dmaap-message-router/dmaap-mr-launch.sh
-dmaap_mr_launch
-MRC_IP=${IP}
+	# Place the scripts in run order:
+	source ${WORKSPACE}/test/csit/scripts/dmaap-message-router/dmaap-mr-launch.sh
+	dmaap_mr_launch
+	MRC_IP=${IP}
 
-source ${WORKSPACE}/test/csit/scripts/dmaap-buscontroller/start-mock.sh
-#start_mock "aaf" 
-AAF_IP=${IP}
-start_mock "drps" 
-DRPS_IP=${IP}
+	source ${WORKSPACE}/test/csit/scripts/dmaap-buscontroller/start-mock.sh
+	#start_mock "aaf" 
+	#AAF_IP=${IP}
+	AAF_IP=0.0.0.0
+	#start_mock "drps" 
+	#DRPS_IP=${IP}
+	DRPS_IP=0.0.0.0
 
-source ${WORKSPACE}/test/csit/scripts/dmaap-buscontroller/dmaapbc-launch.sh 
-dmaapbc_launch $AAF_IP $MRC_IP $DRPS_IP
-DMAAPBC_IP=${IP}
+	source ${WORKSPACE}/test/csit/scripts/dmaap-buscontroller/dmaapbc-launch.sh 
+	dmaapbc_launch $AAF_IP $MRC_IP $DRPS_IP
+	DMAAPBC_IP=${IP}
 
 
-echo "AAF_IP=$AAF_IP MRC_IP=$MRC_IP DRPS_IP=$DRPS_IP DMAAPBC_IP=$DMAAPBC_IP"
+	echo "AAF_IP=$AAF_IP MRC_IP=$MRC_IP DRPS_IP=$DRPS_IP DMAAPBC_IP=$DMAAPBC_IP"
 
-# Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v AAF_IP:${AAF_IP} -v MRC_IP:${MRC_IP} -v DRPS_IP:${DRPS_IP} -v DMAAPBC_IP:${DMAAPBC_IP}"
+	# Pass any variables required by Robot test suites in ROBOT_VARIABLES
+	ROBOT_VARIABLES="-v AAF_IP:${AAF_IP} -v MRC_IP:${MRC_IP} -v DRPS_IP:${DRPS_IP} -v DMAAPBC_IP:${DMAAPBC_IP}"
+	set -x
+	${WORKSPACE}/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh ${DMAAPBC_IP} ${DRPS_IP} ${MRC_IP}
+	set +x
+fi
 
diff --git a/test/csit/plans/dmaap-buscontroller/with_mr/teardown.sh b/test/csit/plans/dmaap-buscontroller/with_mr/teardown.sh
index 0474dde..f35b022 100644
--- a/test/csit/plans/dmaap-buscontroller/with_mr/teardown.sh
+++ b/test/csit/plans/dmaap-buscontroller/with_mr/teardown.sh
@@ -21,8 +21,9 @@
 #
 source ${WORKSPACE}/test/csit/scripts/dmaap-message-router/dmaap-mr-teardown.sh
 
+if [ "$KEEP_DMAAP" != "Y" ]
+then
 dmaap_mr_teardown
-kill-instance.sh aaf-mock
-kill-instance.sh drps-mock
 kill-instance.sh dmaapbc
+fi