blob: f8ba0fb157db0a5f49e30531806f31e04f0402a8 [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
Gary Wu9abb61c2018-09-27 10:38:50 -070023
econwar161a2432019-03-27 11:08:21 +000024${CLI_EXEC_CLI_FILECONSUMER_CP} docker cp fileconsumer-node:/opt/app/subscriber/delivery/oteNB5309_xNF.pm.xml.M %{WORKSPACE}
25${CLI_EXEC_RENAME_METADATA} mv %{WORKSPACE}/oteNB5309_xNF.pm.xml.M %{WORKSPACE}/metadata.json
LiamBurke4d438ce2019-02-14 13:24:52 +000026${metadataSchemaPath} %{WORKSPACE}/tests/usecases/5G-bulkpm/assets/metadata.schema.json
27${metadataJsonPath} %{WORKSPACE}/metadata.json
28
Gary Wu9abb61c2018-09-27 10:38:50 -070029*** Test Cases ***
30
31Send VES File Ready Event to VES Collector
32 [Tags] Bulk_PM_E2E_01
33 [Documentation] Send VES File Ready Event
34 ${evtdata}= Get Event Data From File ${EVENT_DATA_FILE}
35 ${headers}= Create Header From String ${HEADER_STRING}
36 ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
rajendrajaiswalb99eedc2018-10-02 09:42:23 +010037 Sleep 15s
Gary Wu9abb61c2018-09-27 10:38:50 -070038 ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
rajendrajaiswala2c1ca22018-09-30 16:42:27 +010039 Sleep 5s
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 Log Receive HTTP Status code ${resp.status_code}
45 Should Be Equal As Strings ${resp.status_code} 202
46
47Check VES Notification Topic is existing in Message Router
48 [Tags] Bulk_PM_E2E_02
49 [Documentation] Get the VES Notification topic on message router
50 [Timeout] 1 minute
51 Sleep 10s
52 ${resp}= GetCall ${TARGETURL_TOPICS}
53 log ${TARGETURL_TOPICS}
54 log 'JSON Response Code :'${resp}
55 ${topics}= Evaluate $resp.json().get('topics')
56 log ${topics}
57 ${ListLength}= Get Length ${topics}
58 log ${ListLength}
59 List Should Contain Value ${topics} unauthenticated.VES_NOTIFICATION_OUTPUT
60
LiamBurkeb0876222019-02-26 17:04:48 +000061Verify Data File Collector successfully publishes the PM XML file to the Data Router
rajendrajaiswala2c1ca22018-09-30 16:42:27 +010062 [Tags] Bulk_PM_E2E_03
LiamBurkeb0876222019-02-26 17:04:48 +000063 [Documentation] Check that DFC publishes the PM XML to the Data Router
64 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC_LOG} shell=yes
rajendrajaiswala2c1ca22018-09-30 16:42:27 +010065 Log ${cli_cmd_output.stdout}
66 Should Be Equal As Strings ${cli_cmd_output.rc} 0
LiamBurkeb0876222019-02-26 17:04:48 +000067 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC_LOG_GREP} shell=yes
68 Log ${cli_cmd_output.stdout}
69 Should Be Equal As Strings ${cli_cmd_output.rc} 0
70 Should Contain ${cli_cmd_output.stdout} Publish to DR successful!
Gary Wu9abb61c2018-09-27 10:38:50 -070071
72
73Verify Default Feed And File Consumer Subscription On Datarouter
rajendrajaiswala2c1ca22018-09-30 16:42:27 +010074 [Tags] Bulk_PM_E2E_04
75 [Documentation] Verify Default Feed And File Consumer Subscription On Datarouter
76 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} shell=yes
77 Log ${cli_cmd_output.stdout}
78 Should Be Equal As Strings ${cli_cmd_output.rc} 0
79 Should Contain ${cli_cmd_output.stdout} https://dmaap-dr-prov/publish/1
80 Should Contain ${cli_cmd_output.stdout} http://${DR_SUBSCIBER_IP}:7070
81
82
83Verify Fileconsumer Receive PM file from Data Router
84 [Tags] Bulk_PM_E2E_05
85 [Documentation] Check PM XML file exists on the File Consumer Simulator
86 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes
87 Log ${cli_cmd_output.stdout}
88 Should Be Equal As Strings ${cli_cmd_output.rc} 0
econwar161a2432019-03-27 11:08:21 +000089 Should Contain ${cli_cmd_output.stdout} oteNB5309_xNF.pm.xml
LiamBurke4d438ce2019-02-14 13:24:52 +000090
91Verify File Consumer Receive valid metadata from Data Router
92 [Tags] Bulk_PM_E2E_06
93 [Documentation] Check PM XML file is delivered to the FileConsumer Simulator with valid metadata
94 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes
95 Log ${cli_cmd_output.stdout}
96 Should Be Equal As Strings ${cli_cmd_output.rc} 0
econwar161a2432019-03-27 11:08:21 +000097 Should Contain ${cli_cmd_output.stdout} oteNB5309_xNF.pm.xml.M
LiamBurke4d438ce2019-02-14 13:24:52 +000098 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER_CP} shell=yes
99 ${cli_cmd_output}= Run Process ${CLI_EXEC_RENAME_METADATA} shell=yes
100 ${validation_result}= Validate ${metadataSchemaPath} ${metadataJsonPath}
LiamBurkeb0876222019-02-26 17:04:48 +0000101 Should Be Equal As Strings ${validation_result} 0