blob: 84243cba67bbee73aad9727415fa9fb30e750ff9 [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
LiamBurkeb0876222019-02-26 17:04:48 +000022${CLI_EXEC_CLI_DFC_LOG_GREP} grep "Publish to DR successful!" /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
27${CLI_EXEC_MR_PMMAPPER_TOPIC} curl http://${DMAAP_MR_IP}:3904/events/PM_MAPPER/CG1/C1?timeout=1000 > /tmp/mr.log
28${CLI_EXEC_CLI_PMMAPPER_TOPIC_LOG_GREP} grep "perf3gpp_RnNode-Ericsson_pmMeasResult" /tmp/mr.log
Gary Wu9abb61c2018-09-27 10:38:50 -070029
LiamBurke4d438ce2019-02-14 13:24:52 +000030${metadataSchemaPath} %{WORKSPACE}/tests/usecases/5G-bulkpm/assets/metadata.schema.json
31${metadataJsonPath} %{WORKSPACE}/metadata.json
32
Gary Wu9abb61c2018-09-27 10:38:50 -070033*** Test Cases ***
34
35Send 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}
rajendrajaiswalb99eedc2018-10-02 09:42:23 +010041 Sleep 15s
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 ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
rajendrajaiswala2c1ca22018-09-30 16:42:27 +010047 Sleep 5s
Gary Wu9abb61c2018-09-27 10:38:50 -070048 Log Receive HTTP Status code ${resp.status_code}
49 Should Be Equal As Strings ${resp.status_code} 202
50
51Check 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
LiamBurkeb0876222019-02-26 17:04:48 +000065Verify Data File Collector successfully publishes the PM XML file to the Data Router
rajendrajaiswala2c1ca22018-09-30 16:42:27 +010066 [Tags] Bulk_PM_E2E_03
LiamBurkeb0876222019-02-26 17:04:48 +000067 [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
rajendrajaiswala2c1ca22018-09-30 16:42:27 +010069 Log ${cli_cmd_output.stdout}
70 Should Be Equal As Strings ${cli_cmd_output.rc} 0
LiamBurkeb0876222019-02-26 17:04:48 +000071 ${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
74 Should Contain ${cli_cmd_output.stdout} Publish to DR successful!
Gary Wu9abb61c2018-09-27 10:38:50 -070075
76
77Verify Default Feed And File Consumer Subscription On Datarouter
rajendrajaiswala2c1ca22018-09-30 16:42:27 +010078 [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
84 Should Contain ${cli_cmd_output.stdout} http://${DR_SUBSCIBER_IP}:7070
85
86
87Verify 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
LiamBurkeab2e0982019-04-11 11:43:42 +010093 Should Contain ${cli_cmd_output.stdout} A20181002.0000-1000-0015-1000_5G.xml
LiamBurke4d438ce2019-02-14 13:24:52 +000094
95Verify 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
LiamBurkeab2e0982019-04-11 11:43:42 +0100101 Should Contain ${cli_cmd_output.stdout} A20181002.0000-1000-0015-1000_5G.xml.M
LiamBurke4d438ce2019-02-14 13:24:52 +0000102 ${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}
LiamBurkeab2e0982019-04-11 11:43:42 +0100105 Should Be Equal As Strings ${validation_result} 0
106
107Verify 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
118Verify PM-Mapper successfully publishes PMMeasResult VES onto the Message Router Topic PM_MAPPER
119 [Tags] Bulk_PM_E2E_08
120 [Documentation] Check that PM-Mapper publishes VES onto the Message Router
121 ${cli_cmd_output}= Run Process ${CLI_EXEC_MR_PMMAPPER_TOPIC} shell=yes
122 Log ${cli_cmd_output.stdout}
123 Should Be Equal As Strings ${cli_cmd_output.rc} 0
124 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_TOPIC_LOG_GREP} shell=yes
125 Log ${cli_cmd_output.stdout}
126 Should Be Equal As Strings ${cli_cmd_output.rc} 0
127 Should Contain ${cli_cmd_output.stdout} perf3gpp_RnNode-Ericsson_pmMeasResult