Filip Krzywka | d95a670 | 2018-08-06 10:07:03 +0200 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Library DcaeAppSimulatorLibrary |
Filip Krzywka | e263475 | 2018-08-06 10:37:39 +0200 | [diff] [blame^] | 3 | Library XnfSimulatorLibrary |
| 4 | Library VesHvContainersUtilsLibrary |
| 5 | Library Collections |
| 6 | |
| 7 | Suite Setup Message Routing Suite Setup |
| 8 | Suite Teardown VES-HV Collector Suite Teardown |
| 9 | Test Teardown VES-HV Collector Test Shutdown |
Filip Krzywka | d95a670 | 2018-08-06 10:07:03 +0200 | [diff] [blame] | 10 | |
Filip Krzywka | 9318578 | 2018-08-06 09:31:40 +0200 | [diff] [blame] | 11 | *** Test Cases *** |
Filip Krzywka | e263475 | 2018-08-06 10:37:39 +0200 | [diff] [blame^] | 12 | Correct 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 Krzywka | d95a670 | 2018-08-06 10:07:03 +0200 | [diff] [blame] | 19 | Wait until keyword succeeds 60 sec 5 sec |
Filip Krzywka | e263475 | 2018-08-06 10:37:39 +0200 | [diff] [blame^] | 20 | ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_25000} |
| 21 | |
| 22 | *** Keywords *** |
| 23 | Message 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 | |
| 29 | Configure 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 | |
| 35 | Get xNF Simulators |
| 36 | [Arguments] ${AMOUNT} |
| 37 | ${SIMULATORS}= Get Slice From List ${XNF_SIMULATORS_ADDRESSES} 0 ${AMOUNT} |
| 38 | [Return] ${SIMULATORS} |
| 39 | |
| 40 | |
| 41 | Send 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 | |
| 49 | VES-HV Collector Test Shutdown |
| 50 | Reset DCAE App Simulator ${DCAE_APP_API_MESSAGE_RESET_URL} |
| 51 | |
| 52 | |
| 53 | VES-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 |