blob: 3ed6b92c4e70ec12526019b7f24e9c4768b2c78d [file] [log] [blame]
Filip Krzywkad95a6702018-08-06 10:07:03 +02001*** Settings ***
2Library DcaeAppSimulatorLibrary
Filip Krzywkae2634752018-08-06 10:37:39 +02003Library XnfSimulatorLibrary
4Library VesHvContainersUtilsLibrary
5Library Collections
6
7Suite Setup Message Routing Suite Setup
8Suite Teardown VES-HV Collector Suite Teardown
9Test Teardown VES-HV Collector Test Shutdown
Filip Krzywkad95a6702018-08-06 10:07:03 +020010
Filip Krzywka93185782018-08-06 09:31:40 +020011*** Test Cases ***
Filip Krzywkae2634752018-08-06 10:37:39 +020012Correct Messages Routing
13 [Documentation] VES-HV Collector should route all valid messages to topics specified in configuration
14 ... and do not change message payload generated in XNF simulator
15
16 ${SIMULATORS_LIST}= Get xNF Simulators 1
17 Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_FIXED_PAYLOAD_REQUEST}
18
Filip Krzywkad95a6702018-08-06 10:07:03 +020019 Wait until keyword succeeds 60 sec 5 sec
Filip Krzywkae2634752018-08-06 10:37:39 +020020 ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_25000}
21
22*** Keywords ***
23Message Routing Suite Setup
24 Log Started Suite: VES-HV Message Routing
25 ${XNF_PORTS_LIST}= Create List 7000
26 Configure xNF Simulators On Ports ${XNF_PORTS_LIST}
27 Log Suite setup finished
28
29Configure xNF Simulators On Ports
30 [Arguments] ${XNF_PORTS_LIST}
31 ${XNF_SIMULATORS_ADDRESSES}= Start Xnf Simulators ${XNF_PORTS_LIST} True
32 Set Suite Variable ${XNF_SIMULATORS_ADDRESSES}
33
34
35Get xNF Simulators
36 [Arguments] ${AMOUNT}
37 ${SIMULATORS}= Get Slice From List ${XNF_SIMULATORS_ADDRESSES} 0 ${AMOUNT}
38 [Return] ${SIMULATORS}
39
40
41Send Messages From xNF Simulators
42 [Arguments] ${XNF_HOSTS_LIST} ${MESSAGE_FILEPATH}
43 :FOR ${HOST} IN @{XNF_HOSTS_LIST}
44 \ ${XNF_SIM_API_ACCESS}= Get xNF Sim Api Access Url ${HTTP_METHOD_URL} ${HOST}
45 \ ${XNF_SIM_API_URL}= Catenate SEPARATOR= ${XNF_SIM_API_ACCESS} ${XNF_SIM_API_PATH}
46 \ Send messages ${XNF_SIM_API_URL} ${MESSAGE_FILEPATH}
47
48
49VES-HV Collector Test Shutdown
50 Reset DCAE App Simulator ${DCAE_APP_API_MESSAGE_RESET_URL}
51
52
53VES-HV Collector Suite Teardown
54 Stop And Remove All Xnf Simulators
55
56*** Variables ***
57${HTTP_METHOD_URL} http://
58
59${XNF_SIM_API_PATH} /simulator/async
60
61${VES_HV_SCENARIOS} %{WORKSPACE}/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios
62${XNF_FIXED_PAYLOAD_REQUEST} ${VES_HV_SCENARIOS}/fixed-payload/xnf-fixed-payload-request.json
63
64${AMOUNT_25000} 25000