blob: 6d8640a1cacddf53870dcc39b7609aed561b759a [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}
Filip Krzywka81f5d522018-08-06 10:44:47 +020021 Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_FIXED_PAYLOAD_REQUEST}
Filip Krzywkae2634752018-08-06 10:37:39 +020022
23*** Keywords ***
24Message Routing Suite Setup
25 Log Started Suite: VES-HV Message Routing
26 ${XNF_PORTS_LIST}= Create List 7000
27 Configure xNF Simulators On Ports ${XNF_PORTS_LIST}
28 Log Suite setup finished
29
30Configure xNF Simulators On Ports
31 [Arguments] ${XNF_PORTS_LIST}
32 ${XNF_SIMULATORS_ADDRESSES}= Start Xnf Simulators ${XNF_PORTS_LIST} True
33 Set Suite Variable ${XNF_SIMULATORS_ADDRESSES}
34
35
36Get xNF Simulators
37 [Arguments] ${AMOUNT}
38 ${SIMULATORS}= Get Slice From List ${XNF_SIMULATORS_ADDRESSES} 0 ${AMOUNT}
39 [Return] ${SIMULATORS}
40
41
42Send Messages From xNF Simulators
43 [Arguments] ${XNF_HOSTS_LIST} ${MESSAGE_FILEPATH}
44 :FOR ${HOST} IN @{XNF_HOSTS_LIST}
45 \ ${XNF_SIM_API_ACCESS}= Get xNF Sim Api Access Url ${HTTP_METHOD_URL} ${HOST}
46 \ ${XNF_SIM_API_URL}= Catenate SEPARATOR= ${XNF_SIM_API_ACCESS} ${XNF_SIM_API_PATH}
47 \ Send messages ${XNF_SIM_API_URL} ${MESSAGE_FILEPATH}
48
49
50VES-HV Collector Test Shutdown
51 Reset DCAE App Simulator ${DCAE_APP_API_MESSAGE_RESET_URL}
52
53
54VES-HV Collector Suite Teardown
55 Stop And Remove All Xnf Simulators
56
57*** Variables ***
58${HTTP_METHOD_URL} http://
59
60${XNF_SIM_API_PATH} /simulator/async
61
62${VES_HV_SCENARIOS} %{WORKSPACE}/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios
63${XNF_FIXED_PAYLOAD_REQUEST} ${VES_HV_SCENARIOS}/fixed-payload/xnf-fixed-payload-request.json
Filip Krzywka81f5d522018-08-06 10:44:47 +020064${DCAE_FIXED_PAYLOAD_REQUEST} ${VES_HV_SCENARIOS}/fixed-payload/dcae-fixed-payload-request.json
Filip Krzywkae2634752018-08-06 10:37:39 +020065
66${AMOUNT_25000} 25000