Add test case for empty json body send to vesListener API 08/101908/2
authormprzybys <marcin.przybysz@nokia.com>
Tue, 18 Feb 2020 13:33:33 +0000 (13:33 +0000)
committerMarcin Przybysz <marcin.przybysz@nokia.com>
Tue, 25 Feb 2020 10:16:19 +0000 (10:16 +0000)
Issue-ID: INT-1448

Signed-off-by: Marcin Przybysz <marcin.przybysz@nokia.com>
Change-Id: Ic5b5c7fc19c733fe60eb9ab31a870c9b3446d6fb

tests/dcaegen2/testcases/assets/json_events/ves7_missing_mandatory_parameter.json [moved from tests/dcaegen2/testcases/assets/json_events/ves7_missing_mandatory_domain.json with 96% similarity]
tests/dcaegen2/testcases/assets/json_events/ves_empty_json.json [new file with mode: 0644]
tests/dcaegen2/testcases/dcae_ves.robot
tests/dcaegen2/testcases/resources/dcae_properties.robot

@@ -26,8 +26,8 @@
             "eventSeverity": "CRITICAL",
             "vfStatus": "Active",
             "alarmAdditionalInformation": {
-                "PilotNumberPoolSize": "1000"
+               "PilotNumberPoolSize": "1000"
             }
         }
     }
-}
+}
\ No newline at end of file
diff --git a/tests/dcaegen2/testcases/assets/json_events/ves_empty_json.json b/tests/dcaegen2/testcases/assets/json_events/ves_empty_json.json
new file mode 100644 (file)
index 0000000..9e26dfe
--- /dev/null
@@ -0,0 +1 @@
+{}
\ No newline at end of file
index e12097e..c163575 100644 (file)
@@ -31,10 +31,15 @@ Publish Single VES VNF Measurement Event with wrong JSON
     [Documentation]   Post single event with invalid data to /eventListener/v7 endpoint and expect 400 Response Status Code
     Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  ${VES_EVENTLISTENER_V7}  ${VES_INVALID_JSON_V7}  400
 
-Publish Single VES VNF Measurement Event with missing mandatory parameter domain
+Publish Single VES VNF Measurement Event with missing mandatory parameter
     [Tags]    DCAE-VESC-R1
     [Documentation]   Post single event with lack of one of the mandatory parameters "domain" to /eventListener/v7 endpoint and expect 400 Response Status Code
-    Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  ${VES_EVENTLISTENER_V7}  ${VES_MISSING_MANDATORY_DOMAIN_V7}  400
+    Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  ${VES_EVENTLISTENER_V7}  ${VES_MISSING_MANDATORY_PARAMETER_V7}  400
+
+Publish Single VES VNF Measurement Event with empty json
+    [Tags]    DCAE-VESC-R1
+    [Documentation]   Post single event with empty json to /eventListener/v7 endpoint and expect 400 Response Status Code
+    Send Request And Validate Response  Publish Event To VES Collector  ${http_session}  ${VES_EVENTLISTENER_V7}  ${VES_EMPTY_JSON}  400
 
 Publish Single VES VNF Measurement Event with No Auth over HTTPS
     [Tags]    DCAE-VESC-R1
index 5262330..f287ba6 100644 (file)
@@ -31,7 +31,8 @@ ${VES_EVENTLISTENER_V7}                  /eventListener/v7
 ${VES_BATCH_EVENT_ENDPOINT_V7}           /eventListener/v7/eventBatch
 ${VES_VALID_JSON_V7}                     %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_valid.json
 ${VES_INVALID_JSON_V7}                   %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_invalid.json
-${VES_MISSING_MANDATORY_DOMAIN_V7}       %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_missing_mandatory_domain.json
+${VES_MISSING_MANDATORY_PARAMETER_V7}    %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_missing_mandatory_parameter.json
+${VES_EMPTY_JSON}                        %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_empty_json.json
 ${VES_VALID_BATCH_JSON_V7}               %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_batch_valid.json
 ${EVENT_DATA_FILE}                       %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_volte_single_fault_event.json
 ${EVENT_MEASURE_FILE}                    %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_vfirewall_measurement.json