summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominic Lunanuova <dgl@research.att.com>2018-04-17 20:59:12 +0000
committerDominic Lunanuova <dgl@research.att.com>2018-04-18 15:10:57 +0000
commit5a2d8971ce96590ab3d76d313a6f571a37768552 (patch)
tree5b6112c3e08619df2a5e5019302857428b2c0d99
parente03890faa26329ea7c1f8bc1aad0a8f1cda73e63 (diff)
Script for integration with MR
Change-Id: I52a54b441992aad9dd7012a45556c2b84e121ba1 Signed-off-by: Dominic Lunanuova <dgl@research.att.com> Issue-ID: DMAAP-320 Signed-off-by: Dominic Lunanuova <dgl@research.att.com>
-rwxr-xr-xtest/csit/plans/dmaap-buscontroller/with_mr/setup.sh2
-rw-r--r--test/csit/plans/dmaap-buscontroller/with_mr/testplan.txt3
-rwxr-xr-xtest/csit/scripts/dmaap-buscontroller/dmaapbc-launch.sh2
-rwxr-xr-xtest/csit/scripts/dmaap-message-router/dmaap-mr-launch.sh1
-rw-r--r--test/csit/tests/dmaap-buscontroller/single-mr-suite/__init__.robot3
-rw-r--r--test/csit/tests/dmaap-buscontroller/single-mr-suite/test1.robot45
6 files changed, 52 insertions, 4 deletions
diff --git a/test/csit/plans/dmaap-buscontroller/with_mr/setup.sh b/test/csit/plans/dmaap-buscontroller/with_mr/setup.sh
index 3e6efd4d3..35534de0b 100755
--- a/test/csit/plans/dmaap-buscontroller/with_mr/setup.sh
+++ b/test/csit/plans/dmaap-buscontroller/with_mr/setup.sh
@@ -27,7 +27,7 @@ dmaap_mr_launch
MRC_IP=${IP}
source ${WORKSPACE}/test/csit/scripts/dmaap-buscontroller/start-mock.sh
-start_mock "aaf"
+#start_mock "aaf"
AAF_IP=${IP}
start_mock "drps"
DRPS_IP=${IP}
diff --git a/test/csit/plans/dmaap-buscontroller/with_mr/testplan.txt b/test/csit/plans/dmaap-buscontroller/with_mr/testplan.txt
index 39a2f4499..4f4ff717e 100644
--- a/test/csit/plans/dmaap-buscontroller/with_mr/testplan.txt
+++ b/test/csit/plans/dmaap-buscontroller/with_mr/testplan.txt
@@ -1,4 +1,3 @@
# Test suites are relative paths under [integration.git]/test/csit/tests/.
# Place the suites in run order.
-dmaap-buscontroller/suite1
-
+dmaap-buscontroller/single-mr-suite
diff --git a/test/csit/scripts/dmaap-buscontroller/dmaapbc-launch.sh b/test/csit/scripts/dmaap-buscontroller/dmaapbc-launch.sh
index 5c349534b..72c443850 100755
--- a/test/csit/scripts/dmaap-buscontroller/dmaapbc-launch.sh
+++ b/test/csit/scripts/dmaap-buscontroller/dmaapbc-launch.sh
@@ -4,7 +4,7 @@
# sets global var IP with assigned IP address
function dmaapbc_launch() {
- TAG=onap/dmaap/buscontroller:latest
+ TAG=onap/dmaap/buscontroller
CONTAINER_NAME=dmaapbc
IP=""
diff --git a/test/csit/scripts/dmaap-message-router/dmaap-mr-launch.sh b/test/csit/scripts/dmaap-message-router/dmaap-mr-launch.sh
index 95fecff39..c439a97ad 100755
--- a/test/csit/scripts/dmaap-message-router/dmaap-mr-launch.sh
+++ b/test/csit/scripts/dmaap-message-router/dmaap-mr-launch.sh
@@ -36,6 +36,7 @@ function dmaap_mr_launch() {
cd $WORKSPACE/archives/dmaapmr
#unset http_proxy https_proxy
git clone --depth 1 http://gerrit.onap.org/r/dmaap/messagerouter/messageservice -b master
+ cd messageservice
git pull
cd $WORKSPACE/archives/dmaapmr/messageservice/src/main/resources/docker-compose
cp $WORKSPACE/archives/dmaapmr/messageservice/bundleconfig-local/etc/appprops/MsgRtrApi.properties /var/tmp/
diff --git a/test/csit/tests/dmaap-buscontroller/single-mr-suite/__init__.robot b/test/csit/tests/dmaap-buscontroller/single-mr-suite/__init__.robot
new file mode 100644
index 000000000..41c7a0037
--- /dev/null
+++ b/test/csit/tests/dmaap-buscontroller/single-mr-suite/__init__.robot
@@ -0,0 +1,3 @@
+*** Settings ***
+Documentation dmaap-buscontroller - Suite 1
+
diff --git a/test/csit/tests/dmaap-buscontroller/single-mr-suite/test1.robot b/test/csit/tests/dmaap-buscontroller/single-mr-suite/test1.robot
new file mode 100644
index 000000000..f69538dc6
--- /dev/null
+++ b/test/csit/tests/dmaap-buscontroller/single-mr-suite/test1.robot
@@ -0,0 +1,45 @@
+*** Settings ***
+Resource ../../common.robot
+Library Collections
+Library json
+Library OperatingSystem
+Library RequestsLibrary
+
+
+
+*** Variables ***
+${MESSAGE} Hello, world!
+${DBC_URI} webapi
+${TOPIC1} singleMRtopic1
+${TOPIC1_DATA} { "topicName":"singleMRtopic1", "topicDescription":"generated for CSIT", "owner":"dgl"}
+
+
+
+*** Test Cases ***
+Url Test
+ [Documentation] Check if www.onap.org can be reached
+ Create Session sanity http://onap.readthedocs.io
+ ${resp}= Get Request sanity /
+ Should Be Equal As Integers ${resp.status_code} 200
+
+Create Topic Test
+ [Documentation] Check POST ${DBC_URI}/topics endpoint
+ ${resp}= PostCall http://${DMAAPBC_IP}:8080/${DBC_URI}/topics ${TOPIC1_DATA}
+ Should Be Equal As Integers ${resp.status_code} 201
+
+*** Keywords ***
+CheckDir
+ [Arguments] ${path}
+ Directory Should Exist ${path}
+
+CheckUrl
+ [Arguments] ${session} ${path} ${expect}
+ ${resp}= Get Request ${session} ${path}
+ Should Be Equal As Integers ${resp.status_code} ${expect}
+
+PostCall
+ [Arguments] ${url} ${data}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Evaluate requests.post('${url}',data='${data}', headers=${headers},verify=False) requests
+ [Return] ${resp}
+