rajendrajaiswal | 6823ae7 | 2018-09-07 15:23:18 +0100 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Testing E2E VES,Dmaap,DFC,DR with File Ready event feed from xNF |
| 3 | Library RequestsLibrary |
| 4 | Library OperatingSystem |
| 5 | Library Collections |
rajendrajaiswal | aa5b805 | 2018-09-24 17:18:19 +0100 | [diff] [blame] | 6 | Library Process |
rajendrajaiswal | 4b97e33 | 2018-09-27 16:21:19 +0100 | [diff] [blame] | 7 | Resource resources/bulkpm_keywords.robot |
rajendrajaiswal | 6823ae7 | 2018-09-07 15:23:18 +0100 | [diff] [blame] | 8 | |
| 9 | |
| 10 | *** Variables *** |
| 11 | ${VESC_URL} http://%{VESC_IP}:8080 |
| 12 | ${GLOBAL_APPLICATION_ID} robot-ves |
| 13 | ${VES_ANY_EVENT_PATH} /eventListener/v7 |
| 14 | ${HEADER_STRING} content-type=application/json |
rajendrajaiswal | 4b97e33 | 2018-09-27 16:21:19 +0100 | [diff] [blame] | 15 | ${EVENT_DATA_FILE} %{WORKSPACE}/test/csit/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json |
rajendrajaiswal | 6823ae7 | 2018-09-07 15:23:18 +0100 | [diff] [blame] | 16 | |
| 17 | ${TARGETURL_TOPICS} http://${DMAAP_MR_IP}:3904/topics |
| 18 | ${TARGETURL_SUBSCR} http://${DMAAP_MR_IP}:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12?timeout=1000 |
rajendrajaiswal | aa5b805 | 2018-09-24 17:18:19 +0100 | [diff] [blame] | 19 | ${CLI_EXEC_CLI} curl -k https://${DR_PROV_IP}:8443/internal/prov |
rajendrajaiswal | 96b3c98 | 2018-09-25 16:50:26 +0100 | [diff] [blame] | 20 | ${CLI_EXEC_CLI_DFC} docker exec dfc /bin/sh -c "ls /target | grep .gz" |
rajendrajaiswal | aa5b805 | 2018-09-24 17:18:19 +0100 | [diff] [blame] | 21 | |
rajendrajaiswal | 6823ae7 | 2018-09-07 15:23:18 +0100 | [diff] [blame] | 22 | *** Test Cases *** |
| 23 | |
| 24 | Send VES File Ready Event to VES Collector |
rajendrajaiswal | aa5b805 | 2018-09-24 17:18:19 +0100 | [diff] [blame] | 25 | [Tags] Bulk_PM_E2E_01 |
| 26 | [Documentation] Send VES File Ready Event |
rajendrajaiswal | 6823ae7 | 2018-09-07 15:23:18 +0100 | [diff] [blame] | 27 | ${evtdata}= Get Event Data From File ${EVENT_DATA_FILE} |
| 28 | ${headers}= Create Header From String ${HEADER_STRING} |
| 29 | ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} |
rajendrajaiswal | 96b3c98 | 2018-09-25 16:50:26 +0100 | [diff] [blame] | 30 | Sleep 2s |
| 31 | ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} |
| 32 | Sleep 2s |
| 33 | ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} |
| 34 | Sleep 2s |
| 35 | ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} |
rajendrajaiswal | 6823ae7 | 2018-09-07 15:23:18 +0100 | [diff] [blame] | 36 | Log Receive HTTP Status code ${resp.status_code} |
| 37 | Should Be Equal As Strings ${resp.status_code} 202 |
| 38 | |
| 39 | Check VES Notification Topic is existing in Message Router |
rajendrajaiswal | aa5b805 | 2018-09-24 17:18:19 +0100 | [diff] [blame] | 40 | [Tags] Bulk_PM_E2E_02 |
| 41 | [Documentation] Get the VES Notification topic on message router |
rajendrajaiswal | 6823ae7 | 2018-09-07 15:23:18 +0100 | [diff] [blame] | 42 | [Timeout] 1 minute |
| 43 | Sleep 10s |
| 44 | ${resp}= GetCall ${TARGETURL_TOPICS} |
| 45 | log ${TARGETURL_TOPICS} |
| 46 | log 'JSON Response Code :'${resp} |
| 47 | ${topics}= Evaluate $resp.json().get('topics') |
| 48 | log ${topics} |
| 49 | ${ListLength}= Get Length ${topics} |
| 50 | log ${ListLength} |
| 51 | List Should Contain Value ${topics} unauthenticated.VES_NOTIFICATION_OUTPUT |
rajendrajaiswal | aa5b805 | 2018-09-24 17:18:19 +0100 | [diff] [blame] | 52 | |
rajendrajaiswal | 96b3c98 | 2018-09-25 16:50:26 +0100 | [diff] [blame] | 53 | Verify Downloaded PM file from xNF exist on Data File Collector |
| 54 | [Tags] Bulk_PM_E2E_03 |
| 55 | [Documentation] Check the PM XML file exists on the File Consumer Simulator |
| 56 | ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC} shell=yes |
| 57 | Log ${cli_cmd_output.stdout} |
| 58 | Should Be Equal As Strings ${cli_cmd_output.rc} 0 |
| 59 | Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz |
| 60 | |
| 61 | |
rajendrajaiswal | aa5b805 | 2018-09-24 17:18:19 +0100 | [diff] [blame] | 62 | Verify Default Feed And File Consumer Subscription On Datarouter |
| 63 | [Tags] Bulk_PM_E2E_04 |
| 64 | [Documentation] Verify Default Feed And File Consumer Subscription On Datarouter |
| 65 | ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} shell=yes |
| 66 | Log ${cli_cmd_output.stdout} |
| 67 | Should Be Equal As Strings ${cli_cmd_output.rc} 0 |
| 68 | Should Contain ${cli_cmd_output.stdout} https://dmaap-dr-prov/publish/1 |
| 69 | Should Contain ${cli_cmd_output.stdout} http://${DR_SUBSCIBER_IP}:7070 |