aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/scripts
diff options
context:
space:
mode:
authorDominic Lunanuova <dgl@research.att.com>2018-04-20 18:54:47 +0000
committerDominic Lunanuova <dgl@research.att.com>2018-04-20 18:54:58 +0000
commitdb5f9899d30b38d56fc893ec627f6e24fd4bd374 (patch)
tree1af4b450fb8846dc78e04ef5e7ec5a25af5f11cf /test/csit/scripts
parentaedcf8ed19f09c8c7e7731864a53121cf565e052 (diff)
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
Diffstat (limited to 'test/csit/scripts')
-rwxr-xr-xtest/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh17
-rwxr-xr-xtest/csit/scripts/dmaap-buscontroller/dmaapbc-launch.sh9
2 files changed, 15 insertions, 11 deletions
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
diff --git a/test/csit/scripts/dmaap-buscontroller/dmaapbc-launch.sh b/test/csit/scripts/dmaap-buscontroller/dmaapbc-launch.sh
index 72c443850..688ce7d45 100755
--- a/test/csit/scripts/dmaap-buscontroller/dmaapbc-launch.sh
+++ b/test/csit/scripts/dmaap-buscontroller/dmaapbc-launch.sh
@@ -4,13 +4,13 @@
# sets global var IP with assigned IP address
function dmaapbc_launch() {
- TAG=onap/dmaap/buscontroller
+ TAG="nexus3.onap.org:10001/onap/dmaap/buscontroller"
CONTAINER_NAME=dmaapbc
IP=""
cd ${WORKSPACE}/test/csit/scripts/dmaap-buscontroller
- TMP_CFG=/tmp/docker-databys-controller.conf
+ TMP_CFG=/tmp/docker-databus-controller.conf
. ./onapCSIT.env > $TMP_CFG
docker run -d --name $CONTAINER_NAME -v $TMP_CFG:/opt/app/config/conf $TAG
IP=`get-instance-ip.sh ${CONTAINER_NAME}`
@@ -22,9 +22,4 @@ function dmaapbc_launch() {
sleep $i
done
- set -x
- ${WORKSPACE}/test/csit/scripts/dmaap-buscontroller/dmaapbc-init.sh ${IP}
- set +x
-
-
}