blob: 69c7953412839fcc7e78a41bc00ca7020ac646f6 [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
6Resource resources/ves_keywords.robot
7
8
9*** Variables ***
10${VESC_URL} http://%{VESC_IP}:8080
11${GLOBAL_APPLICATION_ID} robot-ves
12${VES_ANY_EVENT_PATH} /eventListener/v7
13${HEADER_STRING} content-type=application/json
14${EVENT_DATA_FILE} %{WORKSPACE}/test/csit/tests/dcae-bulkpm/testcases/assets/json_events/FileExistNotification.json
15
16${TARGETURL_TOPICS} http://${DMAAP_MR_IP}:3904/topics
17${TARGETURL_SUBSCR} http://${DMAAP_MR_IP}:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12?timeout=1000
18*** Test Cases ***
19
20Send VES File Ready Event to VES Collector
21 [Tags] DCAE-VESC-R1
22 [Documentation] Post single event and expect 200 Response
23 ${evtdata}= Get Event Data From File ${EVENT_DATA_FILE}
24 ${headers}= Create Header From String ${HEADER_STRING}
25 ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata}
26 Log Receive HTTP Status code ${resp.status_code}
27 Should Be Equal As Strings ${resp.status_code} 202
28
29Check VES Notification Topic is existing in Message Router
30 [Documentation] Get the count of the Topics
31 [Timeout] 1 minute
32 Sleep 10s
33 ${resp}= GetCall ${TARGETURL_TOPICS}
34 log ${TARGETURL_TOPICS}
35 log 'JSON Response Code :'${resp}
36 ${topics}= Evaluate $resp.json().get('topics')
37 log ${topics}
38 ${ListLength}= Get Length ${topics}
39 log ${ListLength}
40 List Should Contain Value ${topics} unauthenticated.VES_NOTIFICATION_OUTPUT