aboutsummaryrefslogtreecommitdiffstats
path: root/robot
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2019-06-03 18:44:17 -0400
committerDR695H <dr695h@att.com>2019-06-03 18:45:41 -0400
commit59b54c853095283b1bdd83940f7df21f48f57e31 (patch)
tree2b30771aa16880f829781c510c714e18f0b2c014 /robot
parent7aca1a46ebd1401acece1d14b60cbd26265d0487 (diff)
replace protobuf cli with robot lib
Change-Id: I230ef223b8a9264d5935d7cdbccc7db8986c2257 Issue-ID: TEST-158 Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robot')
-rw-r--r--robot/assets/dcae/hvves_msg.rawbin0 -> 296 bytes
-rw-r--r--robot/resources/dcae/hvves.robot2
-rw-r--r--robot/testsuites/hvves.robot7
3 files changed, 5 insertions, 4 deletions
diff --git a/robot/assets/dcae/hvves_msg.raw b/robot/assets/dcae/hvves_msg.raw
new file mode 100644
index 00000000..57d7e891
--- /dev/null
+++ b/robot/assets/dcae/hvves_msg.raw
Binary files differ
diff --git a/robot/resources/dcae/hvves.robot b/robot/resources/dcae/hvves.robot
index 68230355..123bacb3 100644
--- a/robot/resources/dcae/hvves.robot
+++ b/robot/resources/dcae/hvves.robot
@@ -41,6 +41,6 @@ Decode Last Message From Topic
[Documentation] Decode last message from Kafka topic.
[Arguments] ${kafka_server} ${kafka_port} ${kafka_topic} ${sec_protocol} ${mechanisms} ${username} ${password}
#Catenate http://message-router.onap:3904/events/${kafka_topic}/group1/C1?timeout=5000?limit=1
- ${msg}= Run kafkacat -C -b ${kafka_server}:${kafka_port} -t ${kafka_topic} -X security.protocol=${sec_protocol} -X sasl.mechanisms=${mechanisms} -X sasl.username=${username} -X sasl.password=${password} -D "" -o -1 -c 1 | protoc --decode_raw
+ ${msg}= Run kafkacat -C -b ${kafka_server}:${kafka_port} -t ${kafka_topic} -X security.protocol=${sec_protocol} -X sasl.mechanisms=${mechanisms} -X sasl.username=${username} -X sasl.password=${password} -D "" -o -1 -c 1
[Return] ${msg}
diff --git a/robot/testsuites/hvves.robot b/robot/testsuites/hvves.robot
index ea9d678f..733719db 100644
--- a/robot/testsuites/hvves.robot
+++ b/robot/testsuites/hvves.robot
@@ -5,6 +5,7 @@ Test Timeout 3m
Resource ../resources/global_properties.robot
Resource ../resources/dcae/hvves.robot
Library OperatingSystem
+Library ONAPLibrary.Protobuf
*** Test Cases ***
HV-VES test case
@@ -12,6 +13,6 @@ HV-VES test case
Start HV-VES TCP Client And Send Message ${GLOBAL_DCAE_HVVES_SERVER_NAME} ${GLOBAL_DCAE_HVVES_SERVER_PORT}
Wait Until Keyword Succeeds 30s 5s Check If Topic Exists ${GLOBAL_DMAAP_MESSAGE_ROUTER_SERVER_NAME} ${GLOBAL_DMAAP_MESSAGE_ROUTER_SERVER_PORT} ${hvves_kafka_topic}
Check Message Router Api ${GLOBAL_DMAAP_MESSAGE_ROUTER_SERVER_NAME} ${GLOBAL_DMAAP_MESSAGE_ROUTER_SERVER_PORT} ${hvves_kafka_topic}
- ${msg_decoded}= Decode Last Message From Topic ${GLOBAL_DMAAP_KAFKA_SERVER_NAME} ${GLOBAL_DMAAP_KAFKA_SERVER_PORT} ${hvves_kafka_topic} ${security_protocol} ${sasl_mechanisms} ${GLOBAL_DMAAP_KAFKA_JAAS_USERNAME} ${GLOBAL_DMAAP_KAFKA_JAAS_PASSWORD}
- ${msg_decoded_template}= Get File ${EXECDIR}/robot/assets/templates/hvves/hvves_decoded_msg.template
- Should Be Equal As Strings ${msg_decoded} ${msg_decoded_template} \ No newline at end of file
+ ${msg}= Decode Last Message From Topic ${GLOBAL_DMAAP_KAFKA_SERVER_NAME} ${GLOBAL_DMAAP_KAFKA_SERVER_PORT} ${hvves_kafka_topic} ${security_protocol} ${sasl_mechanisms} ${GLOBAL_DMAAP_KAFKA_JAAS_USERNAME} ${GLOBAL_DMAAP_KAFKA_JAAS_PASSWORD}
+ ${results}= Compare File To Message ${EXECDIR}/robot/assets/dcae/hvves_msg.raw ${msg}
+ Should Be True ${results} \ No newline at end of file