blob: 1850df61aeb4e790a0f6d7fbeb436a85e06991af [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
40 ... Assert Dcae App Consumed Less Equal Than ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_25000}
41
42
43Invalid wire frame message handling
44 [Documentation] VES-HV Collector should skip messages with invalid wire frame
45
46 ${XNF_SIMULATOR}= Get xNF Simulators Using Valid Certificates
47 Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_INVALID_WIRE_FRAME_REQUEST}
48
49 Wait until keyword succeeds 60 sec 5 sec
50 ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000}
51 Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_INVALID_WIRE_FRAME_REQUEST}
52
53
54Invalid GPB data message handling
55 [Documentation] VES-HV Collector should skip messages with invalid GPB data
56
57 ${XNF_SIMULATOR}= Get xNF Simulators Using Valid Certificates
58 Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_INVALID_GPB_DATA_REQUEST}
59
60 Wait until keyword succeeds 60 sec 5 sec
61 ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000}
62 Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_INVALID_GPB_DATA_REQUEST}
63
64
65Unsupported domain message handling
66 [Documentation] VES-HV Collector should skip messages with unsupported domain
67
68 ${XNF_SIMULATOR}= Get xNF Simulators Using Valid Certificates
69 Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_UNSUPPORTED_DOMAIN_REQUEST}
70
71 Wait until keyword succeeds 60 sec 5 sec
72 ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000}
73 Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_UNSUPPORTED_DOMAIN_REQUEST}
74
75*** Variables ***
76${HTTP_METHOD_URL} http://
77
78${XNF_SIM_API_PATH} /simulator/async
79
Gary Wu13111e92018-09-27 11:31:33 -070080${VES_HV_SCENARIOS} %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios
Gary Wu9abb61c2018-09-27 10:38:50 -070081${XNF_FIXED_PAYLOAD_REQUEST} ${VES_HV_SCENARIOS}/fixed-payload/xnf-fixed-payload-request.json
82${XNF_TOO_BIG_PAYLOAD_REQUEST} ${VES_HV_SCENARIOS}/too-big-payload/xnf-too-big-payload-request.json
83${XNF_INVALID_WIRE_FRAME_REQUEST} ${VES_HV_SCENARIOS}/invalid-wire-frame/xnf-invalid-wire-frame-request.json
84${XNF_INVALID_GPB_DATA_REQUEST} ${VES_HV_SCENARIOS}/invalid-gpb-data/xnf-invalid-gpb-data-request.json
85${XNF_UNSUPPORTED_DOMAIN_REQUEST} ${VES_HV_SCENARIOS}/unsupported-domain/xnf-unsupported-domain-request.json
86
87${DCAE_FIXED_PAYLOAD_REQUEST} ${VES_HV_SCENARIOS}/fixed-payload/dcae-fixed-payload-request.json
88${DCAE_INVALID_WIRE_FRAME_REQUEST} ${VES_HV_SCENARIOS}/invalid-wire-frame/dcae-invalid-wire-frame-request.json
89${DCAE_INVALID_GPB_DATA_REQUEST} ${VES_HV_SCENARIOS}/invalid-gpb-data/dcae-invalid-gpb-data-request.json
90${DCAE_UNSUPPORTED_DOMAIN_REQUEST} ${VES_HV_SCENARIOS}/unsupported-domain/dcae-unsupported-domain-request.json
91
92${AMOUNT_25000} 25000
93${AMOUNT_50000} 50000