Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Library DcaeAppSimulatorLibrary |
| 3 | Library XnfSimulatorLibrary |
| 4 | Library VesHvContainersUtilsLibrary |
| 5 | Library Collections |
| 6 | |
| 7 | Resource resources/common-keywords.robot |
| 8 | |
| 9 | Suite Setup Message Routing Suite Setup |
| 10 | Suite Teardown VES-HV Collector Suite Teardown |
| 11 | Test Teardown VES-HV Collector Test Shutdown |
| 12 | |
| 13 | *** Keywords *** |
| 14 | Message 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 *** |
| 21 | Correct 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 | |
| 33 | Too 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 Krzywka | 6a82c36 | 2019-03-05 09:00:40 +0100 | [diff] [blame^] | 40 | ... 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 Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 42 | |
| 43 | |
| 44 | Invalid 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 | |
| 55 | Invalid 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 | |
| 66 | Unsupported 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 Wu | 13111e9 | 2018-09-27 11:31:33 -0700 | [diff] [blame] | 81 | ${VES_HV_SCENARIOS} %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 82 | ${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 Krzywka | 6a82c36 | 2019-03-05 09:00:40 +0100 | [diff] [blame^] | 89 | ${DCAE_TOO_BIG_PAYLOAD_REQUEST} ${VES_HV_SCENARIOS}/too-big-payload/dcae-too-big-payload-request.json |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 90 | ${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 |