df47b861e06f37e93142f20bbe21a42616fc7cf7
[integration/csit.git] / tests / dcaegen2-collectors-hv-ves / testcases / __init__.robot
1 # ============LICENSE_START=======================================================
2 # csit-dcaegen2-collectors-hv-ves
3 # ================================================================================
4 # Copyright (C) 2018-2021 NOKIA
5 # ================================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #      http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 # ============LICENSE_END=========================================================
18
19 *** Settings ***
20 Library       DcaeAppSimulatorLibrary
21 Library       ConsulLibrary
22 Library       VesHvContainersUtilsLibrary
23
24 Suite Setup       HV-VES Collector Suites Setup
25
26 *** Keywords ***
27 HV-VES Collector Suites Setup
28     Log   Started Suite: HV-VES
29     Configure collector
30     Configure Dcae App
31     Log   Suite setup finished
32
33
34 Configure collector
35     ${CONSUL_API_ACCESS}=   Get Consul Api Access Url   ${HTTP_METHOD_URL}   ${CONSUL_CONTAINER_HOST}   ${CONSUL_CONTAINER_PORT}
36     ${CONSUL_API_URL}=  Catenate   SEPARATOR=   ${CONSUL_API_ACCESS}   ${CONSUL_HV_VES_CONFIGURATION_KEY_PATH}
37     Set Suite Variable    ${CONSUL_API_URL}   children=True
38     Publish HV VES Configuration In Consul    ${CONSUL_API_URL}   ${HV_VES_CONFIGURATION_JSON_FILEPATH}
39
40 Configure Dcae App
41     Wait until keyword succeeds   10 sec   5 sec
42     ...    Configure Dcae App Simulator To Consume Messages From Topics
43     ...    ${DEFAULT_PERF3GPP_TOPIC},${SECOND_PERF3GPP_TOPIC},${DEFAULT_STNDDEFINED_3GPP_HEARTBEAT_TOPIC}
44     Set Suite Variable   ${DEFAULT_PERF3GPP_TOPIC}   children=True
45     Set Suite Variable   ${SECOND_PERF3GPP_TOPIC}    children=True
46     Set Suite Variable   ${DEFAULT_STNDDEFINED_3GPP_HEARTBEAT_TOPIC}    children=True
47
48
49 *** Variables ***
50 ${HTTP_METHOD_URL}                             http://
51
52 ${CONSUL_CONTAINER_HOST}                       consul-server
53 ${CONSUL_CONTAINER_PORT}                       8500
54 ${CONSUL_HV_VES_CONFIGURATION_KEY_PATH}        /v1/kv/dcae-hv-ves-collector
55
56 ${DEFAULT_PERF3GPP_TOPIC}                      TEST_HV_VES_PERF3GPP
57 ${SECOND_PERF3GPP_TOPIC}                       TEST_HV_VES_PERF3GPP_BUT_WITH_EXTRA_WORDS
58 ${DEFAULT_STNDDEFINED_3GPP_HEARTBEAT_TOPIC}    TEST_SEC_3GPP_HEARTBEAT_OUTPUT
59
60 ${HV_VES_RESOURCES}                            %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources
61 ${HV_VES_CONFIGURATION_JSON_FILEPATH}          ${HV_VES_RESOURCES}/hv-ves-configuration.json