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} |
Filip Krzywka | 81f5d52 | 2018-08-06 10:44:47 +0200 | [diff] [blame^] | 21 | Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_FIXED_PAYLOAD_REQUEST} |
Filip Krzywka | e263475 | 2018-08-06 10:37:39 +0200 | [diff] [blame] | 22 | |
| 23 | *** Keywords *** |
| 24 | Message 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 | |
| 30 | Configure 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 | |
| 36 | Get xNF Simulators |
| 37 | [Arguments] ${AMOUNT} |
| 38 | ${SIMULATORS}= Get Slice From List ${XNF_SIMULATORS_ADDRESSES} 0 ${AMOUNT} |
| 39 | [Return] ${SIMULATORS} |
| 40 | |
| 41 | |
| 42 | Send 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 | |
| 50 | VES-HV Collector Test Shutdown |
| 51 | Reset DCAE App Simulator ${DCAE_APP_API_MESSAGE_RESET_URL} |
| 52 | |
| 53 | |
| 54 | VES-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 Krzywka | 81f5d52 | 2018-08-06 10:44:47 +0200 | [diff] [blame^] | 64 | ${DCAE_FIXED_PAYLOAD_REQUEST} ${VES_HV_SCENARIOS}/fixed-payload/dcae-fixed-payload-request.json |
Filip Krzywka | e263475 | 2018-08-06 10:37:39 +0200 | [diff] [blame] | 65 | |
| 66 | ${AMOUNT_25000} 25000 |