blob: 154b5139f9876299ba2178608d99ddc0e3def063 [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"
21
22*** Test Cases ***
23
24Send VES File Ready Event to VES Collector
25 [Tags] Bulk_PM_E2E_01
26 [Documentation] Send VES File Ready Event
27 ${evtdata}= Get Event Data From File ${EVENT_DATA_FILE}
28 ${headers}= Create Header From String ${HEADER_STRING}
29 ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
30 Sleep 2s
31 ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
32 Sleep 2s
33 ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
34 Sleep 2s
35 ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
36 Log Receive HTTP Status code ${resp.status_code}
37 Should Be Equal As Strings ${resp.status_code} 202
38
39Check VES Notification Topic is existing in Message Router
40 [Tags] Bulk_PM_E2E_02
41 [Documentation] Get the VES Notification topic on message router
42 [Timeout] 1 minute
43 Sleep 10s
44 ${resp}= GetCall ${TARGETURL_TOPICS}
45 log ${TARGETURL_TOPICS}
46 log 'JSON Response Code :'${resp}
47 ${topics}= Evaluate $resp.json().get('topics')
48 log ${topics}
49 ${ListLength}= Get Length ${topics}
50 log ${ListLength}
51 List Should Contain Value ${topics} unauthenticated.VES_NOTIFICATION_OUTPUT
52
53Verify Downloaded PM file from xNF exist on Data File Collector
54 [Tags] Bulk_PM_E2E_03
55 [Documentation] Check the PM XML file exists on the File Consumer Simulator
56 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC} shell=yes
57 Log ${cli_cmd_output.stdout}
58 Should Be Equal As Strings ${cli_cmd_output.rc} 0
59 Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz
60
61
62Verify Default Feed And File Consumer Subscription On Datarouter
63 [Tags] Bulk_PM_E2E_04
64 [Documentation] Verify Default Feed And File Consumer Subscription On Datarouter
65 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} shell=yes
66 Log ${cli_cmd_output.stdout}
67 Should Be Equal As Strings ${cli_cmd_output.rc} 0
68 Should Contain ${cli_cmd_output.stdout} https://dmaap-dr-prov/publish/1
69 Should Contain ${cli_cmd_output.stdout} http://${DR_SUBSCIBER_IP}:7070