blob: e89d4d675149cc4fb4673c0579623221718ad55a [file] [log] [blame]
Gary Wu9abb61c2018-09-27 10:38:50 -07001*** Settings ***
2Documentation Testing E2E VES,Dmaap,DFC,DR with File Ready event feed from xNF
3Library RequestsLibrary
4Library OperatingSystem
5Library Collections
6Library Process
7Resource resources/bulkpm_keywords.robot
8
9
10*** Variables ***
LiamBurkea4516192019-02-11 12:28:55 +000011${VESC_URL} http://%{VESC_IP}:%{VESC_PORT}
Gary Wu9abb61c2018-09-27 10:38:50 -070012${GLOBAL_APPLICATION_ID} robot-ves
13${VES_ANY_EVENT_PATH} /eventListener/v7
14${HEADER_STRING} content-type=application/json
Gary Wu13111e92018-09-27 11:31:33 -070015${EVENT_DATA_FILE} %{WORKSPACE}/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json
Gary Wu9abb61c2018-09-27 10:38:50 -070016
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
econwar161a2432019-03-27 11:08:21 +000020${CLI_EXEC_CLI_FILECONSUMER} docker exec fileconsumer-node /bin/sh -c "ls /opt/app/subscriber/delivery | grep .xml"
LiamBurke3608af72019-03-12 22:50:33 +000021${CLI_EXEC_CLI_DFC_LOG} docker exec dfc /bin/sh -c "cat /var/log/ONAP/application.log" > /tmp/dfc_docker.log.robot
LiamBurkea2879032019-06-19 17:00:15 +010022${CLI_EXEC_CLI_DFC_LOG_GREP} grep "Datafile file published" /tmp/dfc_docker.log.robot
LiamBurkeab2e0982019-04-11 11:43:42 +010023${CLI_EXEC_CLI_FILECONSUMER_CP} docker cp fileconsumer-node:/opt/app/subscriber/delivery/A20181002.0000-1000-0015-1000_5G.xml.M %{WORKSPACE}
24${CLI_EXEC_RENAME_METADATA} mv %{WORKSPACE}/A20181002.0000-1000-0015-1000_5G.xml.M %{WORKSPACE}/metadata.json
25${CLI_EXEC_CLI_PMMAPPER_LOG} docker exec pmmapper /bin/sh -c "cat /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log" > /tmp/pmmapper_docker.log.robot
26${CLI_EXEC_CLI_PMMAPPER_LOG_GREP} grep "XML validation successful Event" /tmp/pmmapper_docker.log.robot
rajendrajaiswal44762cc2019-07-31 15:45:04 +000027${CLI_EXEC_CLI_PMMAPPER_LOG_GREP_VES} grep "Successfully published VES events to messagerouter" /tmp/pmmapper_docker.log.robot
LiamBurke4d438ce2019-02-14 13:24:52 +000028${metadataSchemaPath} %{WORKSPACE}/tests/usecases/5G-bulkpm/assets/metadata.schema.json
29${metadataJsonPath} %{WORKSPACE}/metadata.json
30
Gary Wu9abb61c2018-09-27 10:38:50 -070031*** Test Cases ***
32
33Send VES File Ready Event to VES Collector
34 [Tags] Bulk_PM_E2E_01
35 [Documentation] Send VES File Ready Event
36 ${evtdata}= Get Event Data From File ${EVENT_DATA_FILE}
37 ${headers}= Create Header From String ${HEADER_STRING}
38 ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
rajendrajaiswalb99eedc2018-10-02 09:42:23 +010039 Sleep 15s
Gary Wu9abb61c2018-09-27 10:38:50 -070040 ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
rajendrajaiswala2c1ca22018-09-30 16:42:27 +010041 Sleep 5s
Gary Wu9abb61c2018-09-27 10:38:50 -070042 ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
rajendrajaiswala2c1ca22018-09-30 16:42:27 +010043 Sleep 5s
Gary Wu9abb61c2018-09-27 10:38:50 -070044 ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
rajendrajaiswala2c1ca22018-09-30 16:42:27 +010045 Sleep 5s
Gary Wu9abb61c2018-09-27 10:38:50 -070046 Log Receive HTTP Status code ${resp.status_code}
47 Should Be Equal As Strings ${resp.status_code} 202
48
49Check VES Notification Topic is existing in Message Router
50 [Tags] Bulk_PM_E2E_02
51 [Documentation] Get the VES Notification topic on message router
52 [Timeout] 1 minute
53 Sleep 10s
54 ${resp}= GetCall ${TARGETURL_TOPICS}
55 log ${TARGETURL_TOPICS}
56 log 'JSON Response Code :'${resp}
57 ${topics}= Evaluate $resp.json().get('topics')
58 log ${topics}
59 ${ListLength}= Get Length ${topics}
60 log ${ListLength}
61 List Should Contain Value ${topics} unauthenticated.VES_NOTIFICATION_OUTPUT
62
LiamBurkeb0876222019-02-26 17:04:48 +000063Verify Data File Collector successfully publishes the PM XML file to the Data Router
rajendrajaiswala2c1ca22018-09-30 16:42:27 +010064 [Tags] Bulk_PM_E2E_03
LiamBurkeb0876222019-02-26 17:04:48 +000065 [Documentation] Check that DFC publishes the PM XML to the Data Router
66 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC_LOG} shell=yes
rajendrajaiswala2c1ca22018-09-30 16:42:27 +010067 Log ${cli_cmd_output.stdout}
68 Should Be Equal As Strings ${cli_cmd_output.rc} 0
LiamBurkeb0876222019-02-26 17:04:48 +000069 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC_LOG_GREP} shell=yes
70 Log ${cli_cmd_output.stdout}
71 Should Be Equal As Strings ${cli_cmd_output.rc} 0
LiamBurkea2879032019-06-19 17:00:15 +010072 Should Contain ${cli_cmd_output.stdout} Datafile file published
Gary Wu9abb61c2018-09-27 10:38:50 -070073
74
75Verify Default Feed And File Consumer Subscription On Datarouter
rajendrajaiswala2c1ca22018-09-30 16:42:27 +010076 [Tags] Bulk_PM_E2E_04
77 [Documentation] Verify Default Feed And File Consumer Subscription On Datarouter
78 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} shell=yes
79 Log ${cli_cmd_output.stdout}
80 Should Be Equal As Strings ${cli_cmd_output.rc} 0
81 Should Contain ${cli_cmd_output.stdout} https://dmaap-dr-prov/publish/1
82 Should Contain ${cli_cmd_output.stdout} http://${DR_SUBSCIBER_IP}:7070
83
84
85Verify Fileconsumer Receive PM file from Data Router
86 [Tags] Bulk_PM_E2E_05
87 [Documentation] Check PM XML file exists on the File Consumer Simulator
88 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes
89 Log ${cli_cmd_output.stdout}
90 Should Be Equal As Strings ${cli_cmd_output.rc} 0
LiamBurkeab2e0982019-04-11 11:43:42 +010091 Should Contain ${cli_cmd_output.stdout} A20181002.0000-1000-0015-1000_5G.xml
LiamBurke4d438ce2019-02-14 13:24:52 +000092
93Verify File Consumer Receive valid metadata from Data Router
94 [Tags] Bulk_PM_E2E_06
95 [Documentation] Check PM XML file is delivered to the FileConsumer Simulator with valid metadata
96 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes
97 Log ${cli_cmd_output.stdout}
98 Should Be Equal As Strings ${cli_cmd_output.rc} 0
LiamBurkeab2e0982019-04-11 11:43:42 +010099 Should Contain ${cli_cmd_output.stdout} A20181002.0000-1000-0015-1000_5G.xml.M
LiamBurke4d438ce2019-02-14 13:24:52 +0000100 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER_CP} shell=yes
101 ${cli_cmd_output}= Run Process ${CLI_EXEC_RENAME_METADATA} shell=yes
102 ${validation_result}= Validate ${metadataSchemaPath} ${metadataJsonPath}
LiamBurkeab2e0982019-04-11 11:43:42 +0100103 Should Be Equal As Strings ${validation_result} 0
104
105Verify PM-Mapper successfully receives uncompressed the PM XML file
106 [Tags] Bulk_PM_E2E_07
107 [Documentation] Check that PM-Mapper receives the uncompressed PM XML file
108 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG} shell=yes
109 Log ${cli_cmd_output.stdout}
110 Should Be Equal As Strings ${cli_cmd_output.rc} 0
111 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG_GREP} shell=yes
112 Log ${cli_cmd_output.stdout}
113 Should Be Equal As Strings ${cli_cmd_output.rc} 0
114 Should Contain ${cli_cmd_output.stdout} XML validation successful Event
115
rajendrajaiswal44762cc2019-07-31 15:45:04 +0000116Verify PM-Mapper successfully publishes VES event the Message Router
LiamBurkeab2e0982019-04-11 11:43:42 +0100117 [Tags] Bulk_PM_E2E_08
118 [Documentation] Check that PM-Mapper publishes VES onto the Message Router
rajendrajaiswal44762cc2019-07-31 15:45:04 +0000119 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG} shell=yes
LiamBurkeab2e0982019-04-11 11:43:42 +0100120 Log ${cli_cmd_output.stdout}
121 Should Be Equal As Strings ${cli_cmd_output.rc} 0
rajendrajaiswal44762cc2019-07-31 15:45:04 +0000122 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG_GREP_VES} shell=yes
123 Should Contain ${cli_cmd_output.stdout} Successfully published VES events to messagerouter