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 |
efiacor | 125390b | 2020-05-06 01:14:00 +0100 | [diff] [blame] | 8 | Library resources/JsonValidatorLibrary.py |
| 9 | Library resources/xNFLibrary.py |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 10 | |
| 11 | |
| 12 | *** Variables *** |
LiamBurke | a451619 | 2019-02-11 12:28:55 +0000 | [diff] [blame] | 13 | ${VESC_URL} http://%{VESC_IP}:%{VESC_PORT} |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 14 | ${GLOBAL_APPLICATION_ID} robot-ves |
| 15 | ${VES_ANY_EVENT_PATH} /eventListener/v7 |
| 16 | ${HEADER_STRING} content-type=application/json |
efiacor | 125390b | 2020-05-06 01:14:00 +0100 | [diff] [blame] | 17 | ${EVENT_DATA_FILE} %{WORKSPACE}/tests/usecases-5G-bulkpm/5G-bulkpm/assets/json_events/FileExistNotification.json |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 18 | |
| 19 | ${TARGETURL_TOPICS} http://${DMAAP_MR_IP}:3904/topics |
| 20 | ${TARGETURL_SUBSCR} http://${DMAAP_MR_IP}:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12?timeout=1000 |
| 21 | ${CLI_EXEC_CLI} curl -k https://${DR_PROV_IP}:8443/internal/prov |
econwar | 161a243 | 2019-03-27 11:08:21 +0000 | [diff] [blame] | 22 | ${CLI_EXEC_CLI_FILECONSUMER} docker exec fileconsumer-node /bin/sh -c "ls /opt/app/subscriber/delivery | grep .xml" |
efiacor | 125390b | 2020-05-06 01:14:00 +0100 | [diff] [blame] | 23 | ${CLI_EXEC_CLI_DFC_LOG} docker exec dcaegen2-datafile-collector /bin/sh -c "cat /var/log/ONAP/application.log" > %{WORKSPACE}/archives/dfc_docker.log |
| 24 | ${CLI_EXEC_CLI_DFC_LOG_GREP} grep "Datafile file published" %{WORKSPACE}/archives/dfc_docker.log |
LiamBurke | ab2e098 | 2019-04-11 11:43:42 +0100 | [diff] [blame] | 25 | ${CLI_EXEC_CLI_FILECONSUMER_CP} docker cp fileconsumer-node:/opt/app/subscriber/delivery/A20181002.0000-1000-0015-1000_5G.xml.M %{WORKSPACE} |
efiacor | 125390b | 2020-05-06 01:14:00 +0100 | [diff] [blame] | 26 | ${CLI_EXEC_RENAME_METADATA} mv %{WORKSPACE}/A20181002.0000-1000-0015-1000_5G.xml.M %{WORKSPACE}/archives/metadata.json |
| 27 | ${CLI_EXEC_CLI_PMMAPPER_LOG} docker exec dcaegen2-pm-mapper /bin/sh -c "cat /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log" > %{WORKSPACE}/archives/pmmapper_docker.log |
| 28 | ${CLI_EXEC_CLI_PMMAPPER_LOG_GREP} grep "XML validation successful Event" %{WORKSPACE}/archives/pmmapper_docker.log |
| 29 | ${CLI_EXEC_CLI_PMMAPPER_LOG_GREP_VES} grep "Successfully published VES events to messagerouter" %{WORKSPACE}/archives/pmmapper_docker.log |
| 30 | ${metadataSchemaPath} %{WORKSPACE}/tests/usecases-5G-bulkpm/5G-bulkpm/assets/metadata.schema.json |
| 31 | ${metadataJsonPath} %{WORKSPACE}/archives/metadata.json |
LiamBurke | 4d438ce | 2019-02-14 13:24:52 +0000 | [diff] [blame] | 32 | |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 33 | *** Test Cases *** |
| 34 | |
| 35 | Send VES File Ready Event to VES Collector |
| 36 | [Tags] Bulk_PM_E2E_01 |
| 37 | [Documentation] Send VES File Ready Event |
| 38 | ${evtdata}= Get Event Data From File ${EVENT_DATA_FILE} |
| 39 | ${headers}= Create Header From String ${HEADER_STRING} |
| 40 | ${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] | 41 | Sleep 15s |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 42 | ${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] | 43 | Sleep 5s |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 44 | ${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] | 45 | Sleep 5s |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 46 | ${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] | 47 | Sleep 5s |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 48 | Log Receive HTTP Status code ${resp.status_code} |
| 49 | Should Be Equal As Strings ${resp.status_code} 202 |
| 50 | |
| 51 | Check VES Notification Topic is existing in Message Router |
| 52 | [Tags] Bulk_PM_E2E_02 |
| 53 | [Documentation] Get the VES Notification topic on message router |
| 54 | [Timeout] 1 minute |
| 55 | Sleep 10s |
| 56 | ${resp}= GetCall ${TARGETURL_TOPICS} |
| 57 | log ${TARGETURL_TOPICS} |
| 58 | log 'JSON Response Code :'${resp} |
| 59 | ${topics}= Evaluate $resp.json().get('topics') |
| 60 | log ${topics} |
| 61 | ${ListLength}= Get Length ${topics} |
| 62 | log ${ListLength} |
| 63 | List Should Contain Value ${topics} unauthenticated.VES_NOTIFICATION_OUTPUT |
| 64 | |
LiamBurke | b087622 | 2019-02-26 17:04:48 +0000 | [diff] [blame] | 65 | Verify Data File Collector successfully publishes the PM XML file to the Data Router |
rajendrajaiswal | a2c1ca2 | 2018-09-30 16:42:27 +0100 | [diff] [blame] | 66 | [Tags] Bulk_PM_E2E_03 |
LiamBurke | b087622 | 2019-02-26 17:04:48 +0000 | [diff] [blame] | 67 | [Documentation] Check that DFC publishes the PM XML to the Data Router |
| 68 | ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC_LOG} shell=yes |
rajendrajaiswal | a2c1ca2 | 2018-09-30 16:42:27 +0100 | [diff] [blame] | 69 | Log ${cli_cmd_output.stdout} |
| 70 | Should Be Equal As Strings ${cli_cmd_output.rc} 0 |
LiamBurke | b087622 | 2019-02-26 17:04:48 +0000 | [diff] [blame] | 71 | ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC_LOG_GREP} shell=yes |
| 72 | Log ${cli_cmd_output.stdout} |
| 73 | Should Be Equal As Strings ${cli_cmd_output.rc} 0 |
LiamBurke | a287903 | 2019-06-19 17:00:15 +0100 | [diff] [blame] | 74 | Should Contain ${cli_cmd_output.stdout} Datafile file published |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 75 | |
| 76 | |
| 77 | Verify Default Feed And File Consumer Subscription On Datarouter |
rajendrajaiswal | a2c1ca2 | 2018-09-30 16:42:27 +0100 | [diff] [blame] | 78 | [Tags] Bulk_PM_E2E_04 |
| 79 | [Documentation] Verify Default Feed And File Consumer Subscription On Datarouter |
| 80 | ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} shell=yes |
| 81 | Log ${cli_cmd_output.stdout} |
| 82 | Should Be Equal As Strings ${cli_cmd_output.rc} 0 |
| 83 | Should Contain ${cli_cmd_output.stdout} https://dmaap-dr-prov/publish/1 |
efiacor | 125390b | 2020-05-06 01:14:00 +0100 | [diff] [blame] | 84 | Should Contain ${cli_cmd_output.stdout} http://datarouter-subscriber:7070 |
rajendrajaiswal | a2c1ca2 | 2018-09-30 16:42:27 +0100 | [diff] [blame] | 85 | |
| 86 | |
| 87 | Verify Fileconsumer Receive PM file from Data Router |
| 88 | [Tags] Bulk_PM_E2E_05 |
| 89 | [Documentation] Check PM XML file exists on the File Consumer Simulator |
| 90 | ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes |
| 91 | Log ${cli_cmd_output.stdout} |
| 92 | Should Be Equal As Strings ${cli_cmd_output.rc} 0 |
LiamBurke | ab2e098 | 2019-04-11 11:43:42 +0100 | [diff] [blame] | 93 | Should Contain ${cli_cmd_output.stdout} A20181002.0000-1000-0015-1000_5G.xml |
LiamBurke | 4d438ce | 2019-02-14 13:24:52 +0000 | [diff] [blame] | 94 | |
| 95 | Verify File Consumer Receive valid metadata from Data Router |
| 96 | [Tags] Bulk_PM_E2E_06 |
| 97 | [Documentation] Check PM XML file is delivered to the FileConsumer Simulator with valid metadata |
| 98 | ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes |
| 99 | Log ${cli_cmd_output.stdout} |
| 100 | Should Be Equal As Strings ${cli_cmd_output.rc} 0 |
LiamBurke | ab2e098 | 2019-04-11 11:43:42 +0100 | [diff] [blame] | 101 | Should Contain ${cli_cmd_output.stdout} A20181002.0000-1000-0015-1000_5G.xml.M |
LiamBurke | 4d438ce | 2019-02-14 13:24:52 +0000 | [diff] [blame] | 102 | ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER_CP} shell=yes |
| 103 | ${cli_cmd_output}= Run Process ${CLI_EXEC_RENAME_METADATA} shell=yes |
| 104 | ${validation_result}= Validate ${metadataSchemaPath} ${metadataJsonPath} |
LiamBurke | ab2e098 | 2019-04-11 11:43:42 +0100 | [diff] [blame] | 105 | Should Be Equal As Strings ${validation_result} 0 |
| 106 | |
| 107 | Verify PM-Mapper successfully receives uncompressed the PM XML file |
| 108 | [Tags] Bulk_PM_E2E_07 |
| 109 | [Documentation] Check that PM-Mapper receives the uncompressed PM XML file |
| 110 | ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG} shell=yes |
| 111 | Log ${cli_cmd_output.stdout} |
| 112 | Should Be Equal As Strings ${cli_cmd_output.rc} 0 |
| 113 | ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG_GREP} shell=yes |
| 114 | Log ${cli_cmd_output.stdout} |
| 115 | Should Be Equal As Strings ${cli_cmd_output.rc} 0 |
| 116 | Should Contain ${cli_cmd_output.stdout} XML validation successful Event |
| 117 | |
rajendrajaiswal | 44762cc | 2019-07-31 15:45:04 +0000 | [diff] [blame] | 118 | Verify PM-Mapper successfully publishes VES event the Message Router |
LiamBurke | ab2e098 | 2019-04-11 11:43:42 +0100 | [diff] [blame] | 119 | [Tags] Bulk_PM_E2E_08 |
| 120 | [Documentation] Check that PM-Mapper publishes VES onto the Message Router |
rajendrajaiswal | 44762cc | 2019-07-31 15:45:04 +0000 | [diff] [blame] | 121 | ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG} shell=yes |
LiamBurke | ab2e098 | 2019-04-11 11:43:42 +0100 | [diff] [blame] | 122 | Log ${cli_cmd_output.stdout} |
| 123 | Should Be Equal As Strings ${cli_cmd_output.rc} 0 |
rajendrajaiswal | 44762cc | 2019-07-31 15:45:04 +0000 | [diff] [blame] | 124 | ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG_GREP_VES} shell=yes |
| 125 | Should Contain ${cli_cmd_output.stdout} Successfully published VES events to messagerouter |