blob: 9098b1abe2c47e6760425e1d18d325675f601b93 [file] [log] [blame]
rajendrajaiswal6823ae72018-09-07 15:23:18 +01001*** Settings ***
2Documentation Testing E2E VES,Dmaap,DFC,DR with File Ready event feed from xNF
3Library RequestsLibrary
4Library OperatingSystem
5Library Collections
rajendrajaiswalaa5b8052018-09-24 17:18:19 +01006Library Process
rajendrajaiswal4b97e332018-09-27 16:21:19 +01007Resource resources/bulkpm_keywords.robot
rajendrajaiswal6823ae72018-09-07 15:23:18 +01008
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
rajendrajaiswal4b97e332018-09-27 16:21:19 +010015${EVENT_DATA_FILE} %{WORKSPACE}/test/csit/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json
rajendrajaiswal6823ae72018-09-07 15:23:18 +010016
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
rajendrajaiswalaa5b8052018-09-24 17:18:19 +010019${CLI_EXEC_CLI} curl -k https://${DR_PROV_IP}:8443/internal/prov
rajendrajaiswal96b3c982018-09-25 16:50:26 +010020${CLI_EXEC_CLI_DFC} docker exec dfc /bin/sh -c "ls /target | grep .gz"
rajendrajaiswalaa5b8052018-09-24 17:18:19 +010021
rajendrajaiswal6823ae72018-09-07 15:23:18 +010022*** Test Cases ***
23
24Send VES File Ready Event to VES Collector
rajendrajaiswalaa5b8052018-09-24 17:18:19 +010025 [Tags] Bulk_PM_E2E_01
26 [Documentation] Send VES File Ready Event
rajendrajaiswal6823ae72018-09-07 15:23:18 +010027 ${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}
rajendrajaiswal96b3c982018-09-25 16:50:26 +010030 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}
rajendrajaiswal6823ae72018-09-07 15:23:18 +010036 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
rajendrajaiswalaa5b8052018-09-24 17:18:19 +010040 [Tags] Bulk_PM_E2E_02
41 [Documentation] Get the VES Notification topic on message router
rajendrajaiswal6823ae72018-09-07 15:23:18 +010042 [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
rajendrajaiswalaa5b8052018-09-24 17:18:19 +010052
rajendrajaiswal96b3c982018-09-25 16:50:26 +010053Verify 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
rajendrajaiswalaa5b8052018-09-24 17:18:19 +010062Verify 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