Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [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 |
| 6 | Library Process |
| 7 | Resource resources/bulkpm_keywords.robot |
| 8 | |
| 9 | |
| 10 | *** Variables *** |
LiamBurke | a451619 | 2019-02-11 12:28:55 +0000 | [diff] [blame] | 11 | ${VESC_URL} http://%{VESC_IP}:%{VESC_PORT} |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 12 | ${GLOBAL_APPLICATION_ID} robot-ves |
| 13 | ${VES_ANY_EVENT_PATH} /eventListener/v7 |
| 14 | ${HEADER_STRING} content-type=application/json |
Gary Wu | 13111e9 | 2018-09-27 11:31:33 -0700 | [diff] [blame] | 15 | ${EVENT_DATA_FILE} %{WORKSPACE}/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [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 |
| 19 | ${CLI_EXEC_CLI} curl -k https://${DR_PROV_IP}:8443/internal/prov |
rajendrajaiswal | a2c1ca2 | 2018-09-30 16:42:27 +0100 | [diff] [blame] | 20 | ${CLI_EXEC_CLI_FILECONSUMER} docker exec fileconsumer-node /bin/sh -c "ls /opt/app/subscriber/delivery | grep .gz" |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 21 | |
LiamBurke | 4d438ce | 2019-02-14 13:24:52 +0000 | [diff] [blame] | 22 | ${CLI_EXEC_CLI_FILECONSUMER_CP} docker cp fileconsumer-node:/opt/app/subscriber/delivery/xNF.pm.xml.gz.M %{WORKSPACE} |
| 23 | ${CLI_EXEC_RENAME_METADATA} mv %{WORKSPACE}/xNF.pm.xml.gz.M %{WORKSPACE}/metadata.json |
| 24 | ${metadataSchemaPath} %{WORKSPACE}/tests/usecases/5G-bulkpm/assets/metadata.schema.json |
| 25 | ${metadataJsonPath} %{WORKSPACE}/metadata.json |
| 26 | |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 27 | *** Test Cases *** |
| 28 | |
| 29 | Send VES File Ready Event to VES Collector |
| 30 | [Tags] Bulk_PM_E2E_01 |
| 31 | [Documentation] Send VES File Ready Event |
| 32 | ${evtdata}= Get Event Data From File ${EVENT_DATA_FILE} |
| 33 | ${headers}= Create Header From String ${HEADER_STRING} |
| 34 | ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} |
rajendrajaiswal | b99eedc | 2018-10-02 09:42:23 +0100 | [diff] [blame] | 35 | Sleep 15s |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 36 | ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} |
rajendrajaiswal | a2c1ca2 | 2018-09-30 16:42:27 +0100 | [diff] [blame] | 37 | Sleep 5s |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 38 | ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} |
rajendrajaiswal | a2c1ca2 | 2018-09-30 16:42:27 +0100 | [diff] [blame] | 39 | Sleep 5s |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 40 | ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} |
rajendrajaiswal | a2c1ca2 | 2018-09-30 16:42:27 +0100 | [diff] [blame] | 41 | Sleep 5s |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 42 | Log Receive HTTP Status code ${resp.status_code} |
| 43 | Should Be Equal As Strings ${resp.status_code} 202 |
| 44 | |
| 45 | Check VES Notification Topic is existing in Message Router |
| 46 | [Tags] Bulk_PM_E2E_02 |
| 47 | [Documentation] Get the VES Notification topic on message router |
| 48 | [Timeout] 1 minute |
| 49 | Sleep 10s |
| 50 | ${resp}= GetCall ${TARGETURL_TOPICS} |
| 51 | log ${TARGETURL_TOPICS} |
| 52 | log 'JSON Response Code :'${resp} |
| 53 | ${topics}= Evaluate $resp.json().get('topics') |
| 54 | log ${topics} |
| 55 | ${ListLength}= Get Length ${topics} |
| 56 | log ${ListLength} |
| 57 | List Should Contain Value ${topics} unauthenticated.VES_NOTIFICATION_OUTPUT |
| 58 | |
| 59 | Verify Downloaded PM file from xNF exist on Data File Collector |
rajendrajaiswal | a2c1ca2 | 2018-09-30 16:42:27 +0100 | [diff] [blame] | 60 | [Tags] Bulk_PM_E2E_03 |
| 61 | [Documentation] Check the PM XML file exists on the data file collector |
LiamBurke | a451619 | 2019-02-11 12:28:55 +0000 | [diff] [blame] | 62 | ${cli_cmd_output}= Run Process %{CLI_EXEC_CLI_DFC} shell=yes |
rajendrajaiswal | a2c1ca2 | 2018-09-30 16:42:27 +0100 | [diff] [blame] | 63 | Log ${cli_cmd_output.stdout} |
| 64 | Should Be Equal As Strings ${cli_cmd_output.rc} 0 |
| 65 | Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 66 | |
| 67 | |
| 68 | Verify Default Feed And File Consumer Subscription On Datarouter |
rajendrajaiswal | a2c1ca2 | 2018-09-30 16:42:27 +0100 | [diff] [blame] | 69 | [Tags] Bulk_PM_E2E_04 |
| 70 | [Documentation] Verify Default Feed And File Consumer Subscription On Datarouter |
| 71 | ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} shell=yes |
| 72 | Log ${cli_cmd_output.stdout} |
| 73 | Should Be Equal As Strings ${cli_cmd_output.rc} 0 |
| 74 | Should Contain ${cli_cmd_output.stdout} https://dmaap-dr-prov/publish/1 |
| 75 | Should Contain ${cli_cmd_output.stdout} http://${DR_SUBSCIBER_IP}:7070 |
| 76 | |
| 77 | |
| 78 | Verify Fileconsumer Receive PM file from Data Router |
| 79 | [Tags] Bulk_PM_E2E_05 |
| 80 | [Documentation] Check PM XML file exists on the File Consumer Simulator |
| 81 | ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes |
| 82 | Log ${cli_cmd_output.stdout} |
| 83 | Should Be Equal As Strings ${cli_cmd_output.rc} 0 |
| 84 | Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz |
LiamBurke | 4d438ce | 2019-02-14 13:24:52 +0000 | [diff] [blame] | 85 | |
| 86 | Verify File Consumer Receive valid metadata from Data Router |
| 87 | [Tags] Bulk_PM_E2E_06 |
| 88 | [Documentation] Check PM XML file is delivered to the FileConsumer Simulator with valid metadata |
| 89 | ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes |
| 90 | Log ${cli_cmd_output.stdout} |
| 91 | Should Be Equal As Strings ${cli_cmd_output.rc} 0 |
| 92 | Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz.M |
| 93 | ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER_CP} shell=yes |
| 94 | ${cli_cmd_output}= Run Process ${CLI_EXEC_RENAME_METADATA} shell=yes |
| 95 | ${validation_result}= Validate ${metadataSchemaPath} ${metadataJsonPath} |
| 96 | Should Be Equal As Strings ${validation_result} 0 |