blob: fcc1cc763949ac9299568bd214c942b88bbceaca [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 ***
11${VESC_URL} http://%{VESC_IP}:8080
12${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
20${CLI_EXEC_CLI_DFC} docker exec dfc /bin/sh -c "ls /target | grep .gz"
rajendrajaiswala2c1ca22018-09-30 16:42:27 +010021${CLI_EXEC_CLI_FILECONSUMER} docker exec fileconsumer-node /bin/sh -c "ls /opt/app/subscriber/delivery | grep .gz"
Gary Wu9abb61c2018-09-27 10:38:50 -070022
23*** Test Cases ***
24
25Send VES File Ready Event to VES Collector
26 [Tags] Bulk_PM_E2E_01
27 [Documentation] Send VES File Ready Event
28 ${evtdata}= Get Event Data From File ${EVENT_DATA_FILE}
29 ${headers}= Create Header From String ${HEADER_STRING}
30 ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
rajendrajaiswalb99eedc2018-10-02 09:42:23 +010031 Sleep 15s
Gary Wu9abb61c2018-09-27 10:38:50 -070032 ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
rajendrajaiswala2c1ca22018-09-30 16:42:27 +010033 Sleep 5s
Gary Wu9abb61c2018-09-27 10:38:50 -070034 ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
rajendrajaiswala2c1ca22018-09-30 16:42:27 +010035 Sleep 5s
Gary Wu9abb61c2018-09-27 10:38:50 -070036 ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
rajendrajaiswala2c1ca22018-09-30 16:42:27 +010037 Sleep 5s
Gary Wu9abb61c2018-09-27 10:38:50 -070038 Log Receive HTTP Status code ${resp.status_code}
39 Should Be Equal As Strings ${resp.status_code} 202
40
41Check VES Notification Topic is existing in Message Router
42 [Tags] Bulk_PM_E2E_02
43 [Documentation] Get the VES Notification topic on message router
44 [Timeout] 1 minute
45 Sleep 10s
46 ${resp}= GetCall ${TARGETURL_TOPICS}
47 log ${TARGETURL_TOPICS}
48 log 'JSON Response Code :'${resp}
49 ${topics}= Evaluate $resp.json().get('topics')
50 log ${topics}
51 ${ListLength}= Get Length ${topics}
52 log ${ListLength}
53 List Should Contain Value ${topics} unauthenticated.VES_NOTIFICATION_OUTPUT
54
55Verify Downloaded PM file from xNF exist on Data File Collector
rajendrajaiswala2c1ca22018-09-30 16:42:27 +010056 [Tags] Bulk_PM_E2E_03
57 [Documentation] Check the PM XML file exists on the data file collector
58 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC} shell=yes
59 Log ${cli_cmd_output.stdout}
60 Should Be Equal As Strings ${cli_cmd_output.rc} 0
61 Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz
Gary Wu9abb61c2018-09-27 10:38:50 -070062
63
64Verify Default Feed And File Consumer Subscription On Datarouter
rajendrajaiswala2c1ca22018-09-30 16:42:27 +010065 [Tags] Bulk_PM_E2E_04
66 [Documentation] Verify Default Feed And File Consumer Subscription On Datarouter
67 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} 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} https://dmaap-dr-prov/publish/1
71 Should Contain ${cli_cmd_output.stdout} http://${DR_SUBSCIBER_IP}:7070
72
73
74Verify Fileconsumer Receive PM file from Data Router
75 [Tags] Bulk_PM_E2E_05
76 [Documentation] Check PM XML file exists on the File Consumer Simulator
77 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes
78 Log ${cli_cmd_output.stdout}
79 Should Be Equal As Strings ${cli_cmd_output.rc} 0
80 Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz