CSITs for StndDefined event routing
[integration/csit.git] / tests / dcaegen2 / testcases / 01__no_auth_tests.robot
1 *** Settings ***
2 Resource          ./resources/dcae_keywords.robot
3 *** Test Cases ***
4 VES Collector HTTP Health Check
5     [Tags]    DCAE-VESC-R1  DCAE-VESC-HC
6     [Documentation]   Run healthcheck over HTTP
7     Run Healthcheck  ${http_session}
8
9 Publish Single VES VNF Measurement Event API V7
10     [Tags]    DCAE-VESC-R1
11     [Documentation]   Post single event with valid data to /eventListener/v7 endpoint and expect 202 Response Status Code
12     Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  ${VES_EVENTLISTENER_V7}  ${VES_VALID_JSON_V7}  202  ab305d54-85b4-a31b-7db2-fb6b9e546015
13
14 Publish Single VES VNF Measurement Event with Standard Defined Fields API V7
15     [Tags]    DCAE-VESC-R1
16     [Documentation]   Post single event with valid data with Standard Defined Fields to /eventListener/v7 endpoint and expect 202 Response Status Code
17     Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  ${VES_EVENTLISTENER_V7}  ${VES_VALID_JSON_V7_STND_DEF_FIELDS}  202  stndDefined-gNB-Nokia-PowerLost  unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT
18
19 Publish Single VES VNF Measurement Event with wrong JSON
20     [Tags]    DCAE-VESC-R1
21     [Documentation]   Post single event with invalid data to /eventListener/v7 endpoint and expect 400 Response Status Code
22     Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  ${VES_EVENTLISTENER_V7}  ${VES_INVALID_JSON_V7}  400
23
24 Publish Single VES VNF Measurement Event with missing mandatory parameter
25     [Tags]    DCAE-VESC-R1
26     [Documentation]   Post single event with lack of one of the mandatory parameters "domain" to /eventListener/v7 endpoint and expect 400 Response Status Code
27     Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  ${VES_EVENTLISTENER_V7}  ${VES_MISSING_MANDATORY_PARAMETER_V7}  400
28
29 Publish Single VES VNF Measurement Event with empty json
30     [Tags]    DCAE-VESC-R1
31     [Documentation]   Post single event with empty json to /eventListener/v7 endpoint and expect 400 Response Status Code
32     Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  ${VES_EVENTLISTENER_V7}  ${VES_EMPTY_JSON}  400
33
34 Publish Single VES VNF Measurement Event with parameter out of schema
35     [Tags]    DCAE-VESC-R1
36     [Documentation]   Post single event with parameter which is not defined in schema and send to /eventListener/v7 endpoint. Expected 400 Response Status Code
37     Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  ${VES_EVENTLISTENER_V7}  ${VES_PARAMETER_OUT_OF_SCHEMA_V7}  400
38
39 Publish Single VES VNF Measurement Event with No Auth over HTTPS
40     [Tags]    DCAE-VESC-R1
41     [Documentation]   Post single event over HTTPS with authentication disabled and expect ConnectionError
42     @{err_content}  Create List  Errno 111
43     Send Request And Expect Error  Publish Event To VES Collector  ${https_basic_auth_session}  ${VES_EVENTLISTENER_V7}  ${VES_VALID_JSON_V7}  ConnectionError:*  @{err_content}
44
45 Publish Single VES VoLTE Fault Event
46     [Tags]    DCAE-VESC-R1
47     [Documentation]   Post single event with valid data to /eventListener/v5 endpoint and expect 202 Response Status Code
48     Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  ${VES_ANY_EVENT_PATH}  ${EVENT_DATA_FILE}  202  ab305d54-85b4-a31b-7db2-fb6b9e546015
49
50 Publish Single VES VNF Measurement Event API V5
51     [Tags]    DCAE-VESC-R1
52     [Documentation]   Post single measurement event with valid data to /eventListener/v5 endpoint and expect 202 Response Status Code
53     Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  ${VES_ANY_EVENT_PATH}  ${EVENT_MEASURE_FILE}  202  0b2b5790-3673-480a-a4bd-5a00b88e5af6
54
55 Publish VES VoLTE Fault Batch Events
56     [Tags]    DCAE-VESC-R1
57     [Documentation]   Post single event with valid data to /eventListener/v5/eventBatch endpoint and expect 202 Response Status Code
58     Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  ${VES_BATCH_EVENT_PATH}  ${EVENT_BATCH_DATA_FILE}  202  ab305d54-85b4-a31b-7db2-fb6b9e546025
59
60 Publish VES Batch Events with empty json
61     [Tags]    DCAE-VESC-R1
62     [Documentation]   Post empty json to /eventListener/v7/eventBatch endpoint and expect 400 Response Status Code
63     Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  ${VES_BATCH_EVENT_ENDPOINT_V7}  ${VES_EMPTY_JSON}  400
64
65 Publish VES Batch Events with missing mandatory parameter
66     [Tags]    DCAE-VESC-R1
67     [Documentation]   Post event list where one of the events doesn't have mandatory domain param, to /eventListener/v7/eventBatch endpoint and expect 400 Response Status Code
68     Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  ${VES_BATCH_EVENT_ENDPOINT_V7}  ${VES_BATCH_MISSING_MANDATORY_PARAM_V7}  400
69
70 Publish VES Batch Events wih parameter out of schema
71     [Tags]    DCAE-VESC-R1
72     [Documentation]   Post event list where one of the events have additional dummy param, to /eventListener/v7/eventBatch endpoint and expect 400 Response Status Code
73     Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  ${VES_BATCH_EVENT_ENDPOINT_V7}  ${VES_BATCH_PARAM_OUT_OF_SCHEMA_V7}  400
74
75 Publish VES Event With Invalid Method
76     [Tags]    DCAE-VESC-R1
77     [Documentation]    Use invalid Put instead of Post method to expect 405 Response Status Code
78     Log   Send HTTP Request with invalid method Put instead of Post
79     Send Request And Validate Response  Publish Event To VES Collector With Put Method  ${http_session}  ${VES_ANY_EVENT_PATH}  ${EVENT_DATA_FILE}  405
80
81 Publish VES Event With Invalid URL Path
82     [Tags]    DCAE-VESC-R1
83     [Documentation]   Post single event to invalid url path and expect 404 Response  Status Code
84     Log   Send HTTP Request with invalid /listener/v5/ instead of /eventListener/v5 path
85     Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  /listener/v5/  ${EVENT_DATA_FILE}  404
86
87 Publish 'Other' Registration Event
88     [Tags]    DCAE-VESC-R1
89     [Documentation]   Post an event aligned with “other” domain and expect HTTP 202 Accepeted Response Status Code
90     Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  ${VES_ANY_EVENT_PATH}  ${EVENT_PNF_REGISTRATION}  202  QTFCOC540002E-reg
91
92 Publish VES Event With Invalid Method V7
93     [Tags]    DCAE-VESC-R1
94     [Documentation]    Use invalid Put instead of Post method to expect 405 Response Status Code
95     Log   Send HTTP Request with invalid method Put instead of Post
96     Send Request And Validate Response  Publish Event To VES Collector With Put Method  ${http_session}  ${VES_EVENTLISTENER_V7}  ${EVENT_DATA_FILE}  405
97
98 Publish VES Event With Invalid URL Path V7
99     [Tags]    DCAE-VESC-R1
100     [Documentation]   Post single event to invalid url path and expect 404 Response  Status Code
101     Log   Send HTTP Request with invalid /listener/v5/ instead of /eventListener/v5 path
102     Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  /listener/v7/  ${EVENT_DATA_FILE}  404
103
104 Publish PNF Registration Event
105     [Tags]    DCAE-VESC-R1
106     [Documentation]   Post PNF Registration event and expect HTTP 202 Accepeted Response Status Code
107     Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  ${VES_EVENTLISTENER_V7}  ${EVENT_PNF_REGISTRATION_V7}  202  registration_38407540