summaryrefslogtreecommitdiffstats
path: root/robot/resources/test_templates/hvves_template.robot
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2019-05-14 11:48:20 -0400
committerDR695H <dr695h@att.com>2019-05-14 11:51:57 -0400
commit0ca56d1bc3ff43e8aca4c330283a01c6a422405a (patch)
treedf3c495769b59e93588557e2bb4e0746d3df3715 /robot/resources/test_templates/hvves_template.robot
parenta9107a734e443c257a114812fb830a3628808efb (diff)
remove unneeded libraries
httplibrary is replicated with requests so replacing the few places that use it with the requests. also removing kafkalibrary since it isnt used and we dont want to use it since its not python 3 compatible. Change-Id: I4acd09e4f0f776ebf99f386d17637712551b3243 Issue-ID: TEST-155 Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robot/resources/test_templates/hvves_template.robot')
-rw-r--r--robot/resources/test_templates/hvves_template.robot19
1 files changed, 8 insertions, 11 deletions
diff --git a/robot/resources/test_templates/hvves_template.robot b/robot/resources/test_templates/hvves_template.robot
index 622cacb0..74f04dc0 100644
--- a/robot/resources/test_templates/hvves_template.robot
+++ b/robot/resources/test_templates/hvves_template.robot
@@ -1,10 +1,10 @@
*** Settings ***
Documentation Template contains stuff for HV-VES use case.
Library OperatingSystem
+Library RequestsLibrary
Library Rammbock
Library BuiltIn
Library Collections
-Library HttpLibrary.HTTP
*** Variables ***
${hvves_message} 0x0a94020a0e73616d706c652d76657273696f6e12087065726633677070180120012a0a70657266334750503232321173616d706c652d6576656e742d6e616d653a1173616d706c652d6576656e742d7479706540f19afddd0548f19afddd05521573616d706c652d6e662d6e616d696e672d636f64655a1673616d706c652d6e66632d6e616d696e672d636f6465621573616d706c652d6e662d76656e646f722d6e616d656a1a73616d706c652d7265706f7274696e672d656e746974792d6964721c73616d706c652d7265706f7274696e672d656e746974792d6e616d657a1073616d706c652d736f757263652d696482010f73616d706c652d786e662d6e616d658a01095554432b30323a3030920105372e302e32120e7465737420746573742074657374
@@ -16,20 +16,17 @@ ${sasl_mechanisms} PLAIN
Check Message Router Api
[Documentation] Checks message via message router API.
[Arguments] ${message_router} ${message_router_port} ${topic}
- ${status} ${response}= Run Keyword And Ignore Error GET http://${message_router}:${message_router_port}/events/${topic}/1/1
- ${response_code}= Get Response Status
- ${response_body}= Get Response Body
- Run Keyword If '${status}'=='FAIL' Should Start With ${response_code} 404
- Run Keyword If '${status}'=='FAIL' Log Topic ${topic} does not exist.
- Run Keyword If '${status}'=='PASS' Should Start With ${response_code} 200
- Run Keyword If '${status}'=='PASS' Log Topic ${topic} exists.
+ ${session}= Create Session session http://${message_router}:${message_router_port}/events
+ ${resp}= Get Request session /${topic}/1/1
+ Run Keyword If 400 <= ${resp.status_code} < 500 Log Topic ${topic} does not exist.
+ Run Keyword If 200 <= ${resp.status_code} < 300 Log Topic ${topic} exists.
Check If Topic Exists
[Documentation] Checks if specific topic exists on kafka.
[Arguments] ${message_router} ${message_router_port} ${topic}
- ${response}= GET http://${message_router}:${message_router_port}/topics
- ${body}= Get Response Body
- ${value}= Get Json Value ${body} /topics
+ ${session}= Create Session session http://${message_router}:${message_router_port}/topics
+ ${resp}= Get Request session /
+ ${value}= Catenate ${resp.json()['topics']}
Should Contain ${value} ${topic}
Define WTP Protocol