blob: 5cd4788b33332e9d694f77d225b048a9615b0517 [file] [log] [blame]
mrichommee7063472020-05-14 10:08:03 +02001*** Settings ***
2Documentation HV-VES 'Sunny Scenario' Robot Framework test - message is sent to the collector and Kafka topic is checked if the message has been published. Content is decoded and checked.
3Default Tags hvves ete
mrichomme1fbff982020-05-15 14:38:29 +02004Test Timeout 5m
mrichommee7063472020-05-14 10:08:03 +02005Resource ../resources/global_properties.robot
6Resource ../resources/dcae/hvves.robot
7Library OperatingSystem
8Library ONAPLibrary.Protobuf
9
10*** Variable ***
11${HVVES_KAFKA_TOPIC} HV_VES_PERF3GPP
12${HVVES_KAFKA_TOPIC_SSL} HV_VES_PERF3GPP_SSL
13
14*** Test Cases ***
15HV-VES SSL test case
mrichomme1fbff982020-05-15 14:38:29 +020016 [Setup] Run Process /app/setup-hvves.sh shell=yes
Krzysztof Kuzmicki5eb73232022-05-06 14:07:52 +020017 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist ${GLOBAL_KAFKA_BOOTSTRAP_SERVICE }
18 Run Keyword If "${status}"=="FAIL" Set Test Config message-router-kafka:9092
19 ... ELSE Set Test Config ${GLOBAL_KAFKA_BOOTSTRAP_SERVICE }
mrichommee7063472020-05-14 10:08:03 +020020 Send Message Over Ssl ${GLOBAL_DCAE_HVVES_SERVER_NAME} ${GLOBAL_DCAE_HVVES_SERVER_PORT}
Krzysztof Kuzmicki5eb73232022-05-06 14:07:52 +020021 Run Keyword If "${status}"=="FAIL" Wait Until Keyword Succeeds 10s 2s Check If Topic Exists ${GLOBAL_DMAAP_MESSAGE_ROUTER_SERVER_NAME} ${GLOBAL_DMAAP_MESSAGE_ROUTER_SERVER_PORT} ${HVVES_KAFKA_TOPIC_SSL}
22 Run Keyword If "${status}"=="FAIL" Check Message Router Api ${GLOBAL_DMAAP_MESSAGE_ROUTER_SERVER_NAME} ${GLOBAL_DMAAP_MESSAGE_ROUTER_SERVER_PORT} ${HVVES_KAFKA_TOPIC_SSL}
Krzysztof Kuzmicki359e3632022-05-05 12:10:40 +020023 ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist ${GLOBAL_KAFKA_BOOTSTRAP_SERVICE }
24 ${msg}= Run Keyword If "${status}"=="FAIL" Decode Last Message From Topic ${GLOBAL_DMAAP_KAFKA_SERVER_NAME} ${GLOBAL_DMAAP_KAFKA_SERVER_PORT} ${HVVES_KAFKA_TOPIC_SSL} ${GLOBAL_DMAAP_KAFKA_JAAS_USERNAME} ${GLOBAL_DMAAP_KAFKA_JAAS_PASSWORD}
Krzysztof Kuzmicki5eb73232022-05-06 14:07:52 +020025 ... ELSE Decode Last Message From Topic STRIMZI User ${GLOBAL_KAFKA_BOOTSTRAP_SERVICE} ${HVVES_KAFKA_TOPIC} ${GLOBAL_KAFKA_USER }
mrichommee7063472020-05-14 10:08:03 +020026 ${results}= Compare File To Message ${EXECDIR}/robot/assets/dcae/hvves_msg.raw ${msg}
27 Should Be True ${results}
Joanna Jeremiczd97e97c2021-09-01 16:03:41 +020028 [Teardown] Set Old Config