From db5f9899d30b38d56fc893ec627f6e24fd4bd374 Mon Sep 17 00:00:00 2001 From: Dominic Lunanuova Date: Fri, 20 Apr 2018 18:54:47 +0000 Subject: 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 Issue-ID: DMAAP-293 --- test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh') diff --git a/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh b/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh index 7ec7345d5..96ac40f18 100755 --- a/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh +++ b/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh @@ -17,6 +17,7 @@ cat << EOF > $JSON } EOF +echo "Initializing /dmaap endpoint" curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/dmaap @@ -33,20 +34,28 @@ cat << EOF > $JSON } EOF +echo "Initializing /dcaeLocations endpoint" curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/dcaeLocations # INITIALIZE: MR object in 1 site +# since MR is currently deployed via docker-compose, its IP doesn't seem +# to be routable from DBCL. Fortunately, the MR port is mapped from the docker bridge IP address. +# Found this article for how to deterine the docker bridge IP so using it as a workaround. +# https://stackoverflow.com/questions/22944631/how-to-get-the-ip-address-of-the-docker-host-from-inside-a-docker-container +# Used the following snippet found buried in a comment to an answer and then modified for only 1 value. +DOCKER_HOST=$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+' | head -1 ) +# Perhaps there is a better way... JSON=/tmp/$$.mrc cat << EOF > $JSON { "dcaeLocationName": "csit-sanfrancisco", - "fqdn": "$3", - "hosts" : [ "$3", "$3", "$3" ], - "protocol" : "https", - "port": "3094" + "fqdn": "$DOCKER_HOST", + "topicProtocol" : "http", + "topicPort": "3904" } EOF +echo "Initializing /mr_clusters endpoint" curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/mr_clusters -- cgit 1.2.3-korg