diff options
author | Krzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com> | 2022-05-06 14:07:52 +0200 |
---|---|---|
committer | Krzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com> | 2022-05-06 14:07:52 +0200 |
commit | 5eb732382fb214d979ba29e82a113fd6379d94d4 (patch) | |
tree | bf68fcbd4dc0b6ba88581730b155bd0fdcf56e3a /robot | |
parent | 359e363689889ddc983f1c35bef14a6fee7b5c8e (diff) |
[ROBOT] Adopt HVVES test case in order to work with strimzi kafka
Adopt HVVES test case in order to work with strimzi kafka.
Signed-off-by: Krzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com>
Issue-ID: DMAAP-1705
Change-Id: I986e28c00b816be873f6791d2cfdf06855244ad8
Diffstat (limited to 'robot')
-rw-r--r-- | robot/assets/dcae/hvves_test_config.yaml | 10 | ||||
-rw-r--r-- | robot/resources/dcae/hvves.robot | 6 | ||||
-rw-r--r-- | robot/testsuites/hvves-ci.robot | 10 |
3 files changed, 14 insertions, 12 deletions
diff --git a/robot/assets/dcae/hvves_test_config.yaml b/robot/assets/dcae/hvves_test_config.yaml index 7ca4dbaf..bd86c1be 100644 --- a/robot/assets/dcae/hvves_test_config.yaml +++ b/robot/assets/dcae/hvves_test_config.yaml @@ -15,7 +15,7 @@ data: password: ${AAF_PASSWORD} username: ${AAF_USER} kafka_info: - bootstrap_servers: message-router-kafka:9092 + bootstrap_servers: placeholder topic_name: HV_VES_PERF3GPP type: kafka ves-3gpp-fault-supervision: @@ -23,7 +23,7 @@ data: password: ${AAF_PASSWORD} username: ${AAF_USER} kafka_info: - bootstrap_servers: message-router-kafka:9092 + bootstrap_servers: placeholder topic_name: SEC_3GPP_FAULTSUPERVISION_OUTPUT type: kafka ves-3gpp-heartbeat: @@ -31,7 +31,7 @@ data: password: ${AAF_PASSWORD} username: ${AAF_USER} kafka_info: - bootstrap_servers: message-router-kafka:9092 + bootstrap_servers: placeholder topic_name: SEC_3GPP_HEARTBEAT_OUTPUT type: kafka ves-3gpp-performance-assurance: @@ -39,7 +39,7 @@ data: password: ${AAF_PASSWORD} username: ${AAF_USER} kafka_info: - bootstrap_servers: message-router-kafka:9092 + bootstrap_servers: placeholder topic_name: SEC_3GPP_PERFORMANCEASSURANCE_OUTPUT type: kafka ves-3gpp-provisioning: @@ -47,6 +47,6 @@ data: password: ${AAF_PASSWORD} username: ${AAF_USER} kafka_info: - bootstrap_servers: message-router-kafka:9092 + bootstrap_servers: placeholder topic_name: SEC_3GPP_PROVISIONING_OUTPUT type: kafka diff --git a/robot/resources/dcae/hvves.robot b/robot/resources/dcae/hvves.robot index 89de8250..04e7e5d2 100644 --- a/robot/resources/dcae/hvves.robot +++ b/robot/resources/dcae/hvves.robot @@ -72,12 +72,12 @@ Decode Last Message From Topic STRIMZI User Set Test Config [Documentation] Changes HV-VES config. - + [Arguments] ${kafka_server} + ${SED}= Set Variable sed -i 's/placeholder/${kafka_server}/g' ${TEST_CONFIG_YAML_PATH} + Run ${SED} ${TEST_CONFIG}= Get File ${TEST_CONFIG_YAML_PATH} encoding=UTF-8 - Save Configuration From Config Map Set Environment Variable TEST_CONFIG ${TEST_CONFIG} - ${cm_name} = Get Config Map Name ${rc} = Run and Return RC kubectl -n onap patch cm ${cm_name} --type strategic -p "%{TEST_CONFIG}" Should Be Equal As Integers ${rc} 0 diff --git a/robot/testsuites/hvves-ci.robot b/robot/testsuites/hvves-ci.robot index 05b05ce0..5cd4788b 100644 --- a/robot/testsuites/hvves-ci.robot +++ b/robot/testsuites/hvves-ci.robot @@ -14,13 +14,15 @@ ${HVVES_KAFKA_TOPIC_SSL} HV_VES_PERF3GPP_SSL *** Test Cases *** HV-VES SSL test case [Setup] Run Process /app/setup-hvves.sh shell=yes - Set Test Config + ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist ${GLOBAL_KAFKA_BOOTSTRAP_SERVICE } + Run Keyword If "${status}"=="FAIL" Set Test Config message-router-kafka:9092 + ... ELSE Set Test Config ${GLOBAL_KAFKA_BOOTSTRAP_SERVICE } Send Message Over Ssl ${GLOBAL_DCAE_HVVES_SERVER_NAME} ${GLOBAL_DCAE_HVVES_SERVER_PORT} - 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} - Check Message Router Api ${GLOBAL_DMAAP_MESSAGE_ROUTER_SERVER_NAME} ${GLOBAL_DMAAP_MESSAGE_ROUTER_SERVER_PORT} ${HVVES_KAFKA_TOPIC_SSL} + 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} + 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} ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist ${GLOBAL_KAFKA_BOOTSTRAP_SERVICE } ${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} - ... ELSE Decode Last Message From Topic STRIMZI User ${GLOBAL_KAFKA_BOOTSTRAP_SERVICE} ${HVVES_KAFKA_TOPIC_SSL} ${GLOBAL_KAFKA_USER } + ... ELSE Decode Last Message From Topic STRIMZI User ${GLOBAL_KAFKA_BOOTSTRAP_SERVICE} ${HVVES_KAFKA_TOPIC} ${GLOBAL_KAFKA_USER } ${results}= Compare File To Message ${EXECDIR}/robot/assets/dcae/hvves_msg.raw ${msg} Should Be True ${results} [Teardown] Set Old Config |