blob: c22c936f0a255269d9556f12ee5ae37e1c3cfc08 [file] [log] [blame]
Gary Wu9abb61c2018-09-27 10:38:50 -07001*** Settings ***
2Library DcaeAppSimulatorLibrary
3Library XnfSimulatorLibrary
4Library VesHvContainersUtilsLibrary
5Library Collections
6
7Resource resources/common-keywords.robot
8
9Suite Setup Message Routing Suite Setup
10Suite Teardown VES-HV Collector Suite Teardown
11Test Teardown VES-HV Collector Test Shutdown
12
13*** Keywords ***
14Message Routing Suite Setup
15 Log Started Suite: VES-HV Message Routing
16 ${XNF_PORTS_LIST}= Create List 7000
17 Configure xNF Simulators Using Valid Certificates On Ports ${XNF_PORTS_LIST}
18 Log Suite setup finished
19
20*** Test Cases ***
21Correct Messages Routing
22 [Documentation] VES-HV Collector should route all valid messages to topics specified in configuration
23 ... and do not change message payload generated in XNF simulator
24
25 ${XNF_SIMULATOR}= Get xNF Simulators Using Valid Certificates
26 Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_FIXED_PAYLOAD_REQUEST}
27
28 Wait until keyword succeeds 60 sec 5 sec
29 ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_25000}
30 Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_FIXED_PAYLOAD_REQUEST}
31
32
33Too big payload message handling
34 [Documentation] VES-HV Collector should interrupt the stream when encountered message with too big payload
35
36 ${XNF_SIMULATOR}= Get xNF Simulators Using Valid Certificates
37 Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_TOO_BIG_PAYLOAD_REQUEST}
38
39 Wait until keyword succeeds 60 sec 5 sec
Filip Krzywka6a82c362019-03-05 09:00:40 +010040 ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_25000}
41 Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_TOO_BIG_PAYLOAD_REQUEST}
Gary Wu9abb61c2018-09-27 10:38:50 -070042
43
44Invalid wire frame message handling
45 [Documentation] VES-HV Collector should skip messages with invalid wire frame
46
47 ${XNF_SIMULATOR}= Get xNF Simulators Using Valid Certificates
48 Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_INVALID_WIRE_FRAME_REQUEST}
49
50 Wait until keyword succeeds 60 sec 5 sec
51 ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000}
52 Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_INVALID_WIRE_FRAME_REQUEST}
53
54
55Invalid GPB data message handling
56 [Documentation] VES-HV Collector should skip messages with invalid GPB data
57
58 ${XNF_SIMULATOR}= Get xNF Simulators Using Valid Certificates
59 Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_INVALID_GPB_DATA_REQUEST}
60
61 Wait until keyword succeeds 60 sec 5 sec
62 ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000}
63 Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_INVALID_GPB_DATA_REQUEST}
64
65
66Unsupported domain message handling
67 [Documentation] VES-HV Collector should skip messages with unsupported domain
68
69 ${XNF_SIMULATOR}= Get xNF Simulators Using Valid Certificates
70 Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_UNSUPPORTED_DOMAIN_REQUEST}
71
72 Wait until keyword succeeds 60 sec 5 sec
73 ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000}
74 Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_UNSUPPORTED_DOMAIN_REQUEST}
75
76*** Variables ***
77${HTTP_METHOD_URL} http://
78
79${XNF_SIM_API_PATH} /simulator/async
80
Gary Wu13111e92018-09-27 11:31:33 -070081${VES_HV_SCENARIOS} %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios
Gary Wu9abb61c2018-09-27 10:38:50 -070082${XNF_FIXED_PAYLOAD_REQUEST} ${VES_HV_SCENARIOS}/fixed-payload/xnf-fixed-payload-request.json
83${XNF_TOO_BIG_PAYLOAD_REQUEST} ${VES_HV_SCENARIOS}/too-big-payload/xnf-too-big-payload-request.json
84${XNF_INVALID_WIRE_FRAME_REQUEST} ${VES_HV_SCENARIOS}/invalid-wire-frame/xnf-invalid-wire-frame-request.json
85${XNF_INVALID_GPB_DATA_REQUEST} ${VES_HV_SCENARIOS}/invalid-gpb-data/xnf-invalid-gpb-data-request.json
86${XNF_UNSUPPORTED_DOMAIN_REQUEST} ${VES_HV_SCENARIOS}/unsupported-domain/xnf-unsupported-domain-request.json
87
88${DCAE_FIXED_PAYLOAD_REQUEST} ${VES_HV_SCENARIOS}/fixed-payload/dcae-fixed-payload-request.json
Filip Krzywka6a82c362019-03-05 09:00:40 +010089${DCAE_TOO_BIG_PAYLOAD_REQUEST} ${VES_HV_SCENARIOS}/too-big-payload/dcae-too-big-payload-request.json
Gary Wu9abb61c2018-09-27 10:38:50 -070090${DCAE_INVALID_WIRE_FRAME_REQUEST} ${VES_HV_SCENARIOS}/invalid-wire-frame/dcae-invalid-wire-frame-request.json
91${DCAE_INVALID_GPB_DATA_REQUEST} ${VES_HV_SCENARIOS}/invalid-gpb-data/dcae-invalid-gpb-data-request.json
92${DCAE_UNSUPPORTED_DOMAIN_REQUEST} ${VES_HV_SCENARIOS}/unsupported-domain/dcae-unsupported-domain-request.json
93
94${AMOUNT_25000} 25000
95${AMOUNT_50000} 50000