aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/tests
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-04-18 19:41:23 +0000
committerGerrit Code Review <gerrit@onap.org>2018-04-18 19:41:23 +0000
commit77f16c3e8ab11ba9cc1f1e0f9b8722756ef006aa (patch)
treead46c12eed170b6694594e6f86c50efd82a8bed4 /test/csit/tests
parent73dd1441e879ecc8622a4a53f479e97547d2cf2f (diff)
parent5a2d8971ce96590ab3d76d313a6f571a37768552 (diff)
Merge "Script for integration with MR"
Diffstat (limited to 'test/csit/tests')
-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
2 files changed, 48 insertions, 0 deletions
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}
+