aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/tests/dmaap/mrpubsub/mrpubsub.robot
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-09-27 10:29:30 -0700
committerGary Wu <gary.i.wu@huawei.com>2018-09-27 12:50:28 -0700
commit2d3d8dcf6ef1bd2a161c69d561c629c5ec3f59c4 (patch)
tree652fd47a183c291e96c6721f550a5f63464f6e66 /test/csit/tests/dmaap/mrpubsub/mrpubsub.robot
parente161173e279a73134dda4c2f429605d6c9ee1fe7 (diff)
Move CSIT to integration/csit repo
To facilite branching of CSIT tests, all CSIT test code and scripts are relocated to the integration/csit repo. Change-Id: I6777cd414e43dbf2bfa6215f7e50849e1a6a2e59 Issue-ID: INT-671 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'test/csit/tests/dmaap/mrpubsub/mrpubsub.robot')
-rwxr-xr-xtest/csit/tests/dmaap/mrpubsub/mrpubsub.robot73
1 files changed, 0 insertions, 73 deletions
diff --git a/test/csit/tests/dmaap/mrpubsub/mrpubsub.robot b/test/csit/tests/dmaap/mrpubsub/mrpubsub.robot
deleted file mode 100755
index c711bd754..000000000
--- a/test/csit/tests/dmaap/mrpubsub/mrpubsub.robot
+++ /dev/null
@@ -1,73 +0,0 @@
-*** Settings ***
-Library OperatingSystem
-Library RequestsLibrary
-Library requests
-Library Collections
-Library String
-
-*** Variables ***
-${TARGETURL_PUBLISH} http://${DMAAP_MR_IP}:3904/events/TestTopic1
-${TARGETURL_TOPICS} http://${DMAAP_MR_IP}:3904/topics
-${TARGETURL_SUBSCR} http://${DMAAP_MR_IP}:3904/events/TestTopic1/CG1/C1?timeout=1000
-${TEST_DATA} {"topicName": "TestTopic1"}
-${TOPIC_DATA} {"topicName":"FirstTopic","topicDescription":"This is a TestTopic","partitionCount":"1","replicationCount":"3","transactionEnabled":"true"}
-
-*** Test Cases ***
-Run Topic Creation and Publish
- [Documentation] Topic Creation
- [Timeout] 1 minute
- ${resp}= PostCall ${TARGETURL_PUBLISH} ${TEST_DATA}
- log ${TARGETURL_PUBLISH}
- log ${resp.text}
- Should Be Equal As Strings ${resp.status_code} 200
- ${count}= Evaluate $resp.json().get('count')
- log 'JSON Response Code:'${resp}
-
-Run Subscribing a message status
- [Documentation] Subscribide message status
- [Timeout] 1 minute
- ${resp}= GetCall ${TARGETURL_SUBSCR}
- log ${TARGETURL_SUBSCR}
- Should Be Equal As Strings ${resp.status_code} 200
- log 'JSON Response Code :'${resp}
-
-Run check topics are exisiting
- [Documentation] Get the count of the Topics
- [Timeout] 1 minute
- ${resp}= GetCall ${TARGETURL_TOPICS}
- log ${TARGETURL_TOPICS}
- Should Be Equal As Strings ${resp.status_code} 200
- log 'JSON Response Code :'${resp}
- ${topics}= Evaluate $resp.json().get('topics')
- log ${topics}
- ${ListLength}= Get Length ${topics}
- log ${ListLength}
- List Should Contain Value ${topics} TestTopic1
-
-Run Publich and Subscribe a message
- [Documentation] Publish and Subscribe the message
- [Timeout] 1 minute
- ${resp}= PostCall ${TARGETURL_PUBLISH} ${TEST_DATA}
- log ${TARGETURL_PUBLISH}
- log ${resp.text}
- Should Be Equal As Strings ${resp.status_code} 200
- ${sub_resp}= GetCall ${TARGETURL_SUBSCR}
- log ${TARGETURL_SUBSCR}
- Should Be Equal As Strings ${sub_resp.status_code} 200
- log 'JSON Response Code :'${sub_resp}
- ${ListLength}= Get Length ${sub_resp.json()}
- log ${ListLength}
- List Should Contain Value ${sub_resp.json()} {"topicName":"TestTopic1"} case_insensitive=yes
-
-*** Keywords ***
-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}
-
-GetCall
- [Arguments] ${url}
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
- ${resp}= Evaluate requests.get('${url}', headers=${headers}, verify=False) requests
- [Return] ${resp}