blob: 23d86663a3ca029a17e398b84c11ee78a4da7933 [file] [log] [blame]
wejs060bc422018-05-25 13:58:11 +02001*** Settings ***
Mariusz Wagner5f108de2018-07-12 08:36:13 +02002Documentation Integration tests for PRH.
3... PRH receive events from DMaaP and produce or not PNF_READY notification depends on required fields in received event.
Mariusz Wagner831baff2018-09-14 14:24:02 +02004Suite Setup Run keywords Create header Create sessions
Mariusz Wagnercfd26b92018-06-13 14:30:27 +02005Library resources/PrhLibrary.py
Mariusz Wagner5f108de2018-07-12 08:36:13 +02006Resource resources/prh_library.robot
Mariusz Wagner831baff2018-09-14 14:24:02 +02007Resource ../../common.robot
wejs060bc422018-05-25 13:58:11 +02008
9*** Variables ***
Mariusz Wagner5f108de2018-07-12 08:36:13 +020010${DMAAP_SIMULATOR_URL} http://${DMAAP_SIMULATOR}
11${AAI_SIMULATOR_URL} http://${AAI_SIMULATOR}
Mariusz Wagner4a6ece42018-06-05 15:54:27 +020012${PRH_URL} http://${PRH}
Mariusz Wagner831baff2018-09-14 14:24:02 +020013${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS} %{WORKSPACE}/test/csit/tests/dcaegen2/prh-testcases/assets/json_events/event_with_all_fields.json
14${EVENT_WITH_IPV4} %{WORKSPACE}/test/csit/tests/dcaegen2/prh-testcases/assets/json_events/event_with_IPV4.json
15${EVENT_WITH_IPV6} %{WORKSPACE}/test/csit/tests/dcaegen2/prh-testcases/assets/json_events/event_with_IPV6.json
16${EVENT_WITH_MISSING_IPV4_AND_IPV6} %{WORKSPACE}/test/csit/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_IPV4_and_IPV6.json
17${EVENT_WITH_MISSING_SOURCENAME} %{WORKSPACE}/test/csit/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName.json
18${EVENT_WITH_MISSING_SOURCENAME_AND_IPV4} %{WORKSPACE}/test/csit/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV4.json
19${EVENT_WITH_MISSING_SOURCENAME_AND_IPV6} %{WORKSPACE}/test/csit/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV6.json
20${EVENT_WITH_MISSING_SOURCENAME_IPV4_AND_IPV6} %{WORKSPACE}/test/csit/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_IPV4_and_IPV6.json
21${Not_json_format} %{WORKSPACE}/test/csit/tests/dcaegen2/prh-testcases/assets/json_events/not_json_format.json
wejs060bc422018-05-25 13:58:11 +020022
23*** Test Cases ***
Mariusz Wagner5f108de2018-07-12 08:36:13 +020024Valid DMaaP event can be converted to PNF_READY notification
25 [Documentation] PRH get valid event from DMaaP with required fields - PRH produce PNF_READY notification
26 [Tags] PRH Valid event
27 [Template] Valid event processing
28 ${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}
Mariusz Wagner831baff2018-09-14 14:24:02 +020029 ${EVENT_WITH_IPV4}
30 ${EVENT_WITH_IPV6}
wejs060bc422018-05-25 13:58:11 +020031
Mariusz Wagner5f108de2018-07-12 08:36:13 +020032Invalid DMaaP event cannot be converted to PNF_READY notification
33 [Documentation] PRH get invalid event from DMaaP with missing required fields - PRH does not produce PNF_READY notification
34 [Tags] PRH Invalid event
35 [Template] Invalid event processing
Mariusz Wagner831baff2018-09-14 14:24:02 +020036 ${EVENT_WITH_MISSING_IPV4_AND_IPV6}
37 ${EVENT_WITH_MISSING_SOURCENAME}
38 ${EVENT_WITH_MISSING_SOURCENAME_AND_IPV4}
39 ${EVENT_WITH_MISSING_SOURCENAME_AND_IPV6}
40 ${EVENT_WITH_MISSING_SOURCENAME_IPV4_AND_IPV6}
Mariusz Wagnera2a6c982018-06-14 15:53:56 +020041
Mariusz Wagner5f108de2018-07-12 08:36:13 +020042Get valid event from DMaaP and record in AAI does not exist
43 [Documentation] PRH get valid event from DMaaP with all required fields and in AAI record doesn't exist - PRH does not produce PNF_READY notification
44 [Tags] PRH Missing AAI record
Mariusz Wagner60be36d2018-07-05 11:32:51 +020045 [Timeout] 30s
Mariusz Wagner831baff2018-09-14 14:24:02 +020046 ${data}= Get Data From File ${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}
Mariusz Wagner3cbe5472018-07-30 14:19:50 +020047 Set PNF name in AAI wrong_aai_record
Mariusz Wagner831baff2018-09-14 14:24:02 +020048 Set event in DMaaP ${data}
Mariusz Wagner34799782018-09-06 12:48:32 +020049 Wait Until Keyword Succeeds 100x 300ms Check PRH log java.io.IOException: Connection closed prematurely
50
51Event in DMaaP is not JSON format
52 [Documentation] PRH get not JSON format event from DMaaP - PRH does not produce PNF_READY notification
53 [Tags] PRH
Mariusz Wagner831baff2018-09-14 14:24:02 +020054 ${data}= Get Data From File ${Not_json_format}
55 Set event in DMaaP ${data}
Mariusz Wagner34799782018-09-06 12:48:32 +020056 Wait Until Keyword Succeeds 100x 300ms Check PRH log |java.lang.IllegalStateException: Not a JSON Array:
Mariusz Wagner6d588322018-07-25 12:26:49 +020057
58Get valid event from DMaaP and AAI is not responding
59 [Documentation] PRH get valid event from DMaaP with all required fields and AAI is not responding - PRH does not produce PNF_READY notification
60 [Tags] PRH AAI
61 [Timeout] 180s
Mariusz Wagner831baff2018-09-14 14:24:02 +020062 ${data}= Get Data From File ${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}
Mariusz Wagner6d588322018-07-25 12:26:49 +020063 Stop AAI
Mariusz Wagner831baff2018-09-14 14:24:02 +020064 Set event in DMaaP ${data}
Mariusz Wagner34799782018-09-06 12:48:32 +020065 Wait Until Keyword Succeeds 100x 300ms Check PRH log java.net.UnknownHostException: aai