blob: 3de7e91ae12c7da03a5434dbc5ab09cbea645742 [file] [log] [blame]
Gary Wu9abb61c2018-09-27 10:38:50 -07001*** Settings ***
2Documentation Integration tests for PRH.
3... PRH receive events from DMaaP and produce or not PNF_READY notification depends on required fields in received event.
pkarasc7abba82018-10-22 12:22:35 +02004Suite Setup Run keywords Create header AND Create sessions AND Ensure Container Is Running prh AND Ensure Container Is Exited ssl_prh
5Suite Teardown Ensure Container Is Running ssl_prh
6Test Teardown Reset Simulators
Gary Wu9abb61c2018-09-27 10:38:50 -07007Library resources/PrhLibrary.py
8Resource resources/prh_library.robot
9Resource ../../common.robot
10
11*** Variables ***
pkarasc7abba82018-10-22 12:22:35 +020012${DMAAP_SIMULATOR_SETUP_URL} http://${DMAAP_SIMULATOR_SETUP}
pkaras55d36862018-10-17 15:08:34 +020013${AAI_SIMULATOR_SETUP_URL} http://${AAI_SIMULATOR_SETUP}
Marcin Migdalfba99a52019-04-15 14:36:45 +020014${CONSUL_SETUP_URL} http://${CONSUL_SETUP}
Marcin Migdalf969c742019-04-05 11:47:19 +020015
16${VES_EVENT_PNF_REGISTRATION_SIMPLE} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/ves-event-pnf-registration-simple.json
Marcin Migdal26125b12019-04-11 16:17:18 +020017${AAI_PNF_REGISTRATION_SIMPLE} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/aai-pnf-registration-simple.json
Gary Wu13111e92018-09-27 11:31:33 -070018${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_all_fields.json
19${EVENT_WITH_IPV4} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_IPV4.json
20${EVENT_WITH_IPV6} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_IPV6.json
21${EVENT_WITH_MISSING_IPV4_AND_IPV6} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_IPV4_and_IPV6.json
22${EVENT_WITH_MISSING_SOURCENAME} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName.json
23${EVENT_WITH_MISSING_SOURCENAME_AND_IPV4} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV4.json
24${EVENT_WITH_MISSING_SOURCENAME_AND_IPV6} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV6.json
25${EVENT_WITH_MISSING_SOURCENAME_IPV4_AND_IPV6} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_IPV4_and_IPV6.json
Marcin Migdal183c8962019-02-13 15:43:12 +010026${EVENT_WITH_OPTIONAL_REGISTRATION_FIELDS_ALL_FILLED} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_all_filled.json
27${EVENT_WITH_OPTIONAL_REGISTRATION_FIELDS_EMPTY} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_empty.json
28${EVENT_WITH_OPTIONAL_REGISTRATION_FIELDS_MISSING_ALL} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_missing_all.json
29${EVENT_WITH_OPTIONAL_REGISTRATION_FIELDS_MISSING_PARTIAL} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_missing_partial.json
Mariusz Wagner1fd732a2018-09-28 09:03:08 +020030${EVENT_WITHOUT_IPV6_FILED} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_without_IPV6_field.json
Gary Wu13111e92018-09-27 11:31:33 -070031${Not_json_format} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/not_json_format.json
Gary Wu9abb61c2018-09-27 10:38:50 -070032
33*** Test Cases ***
Marcin Migdal26125b12019-04-11 16:17:18 +020034Process valid simple PNF Registration DMaaP event which can be converted to PNF_READY notification
Gary Wu9abb61c2018-09-27 10:38:50 -070035 [Documentation] PRH get valid event from DMaaP with required fields - PRH produce PNF_READY notification
36 [Tags] PRH Valid event
37 [Template] Valid event processing
Marcin Migdal26125b12019-04-11 16:17:18 +020038 ${VES_EVENT_PNF_REGISTRATION_SIMPLE} ${AAI_PNF_REGISTRATION_SIMPLE}
Marcin Migdalf969c742019-04-05 11:47:19 +020039 #${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}
40 #${EVENT_WITH_IPV4}
41 #${EVENT_WITH_IPV6}
42 #${EVENT_WITHOUT_IPV6_FILED}
43 #${EVENT_WITH_OPTIONAL_REGISTRATION_FIELDS_ALL_FILLED}
44 #${EVENT_WITH_OPTIONAL_REGISTRATION_FIELDS_EMPTY}
45 #${EVENT_WITH_OPTIONAL_REGISTRATION_FIELDS_MISSING_ALL}
46 #${EVENT_WITH_OPTIONAL_REGISTRATION_FIELDS_MISSING_PARTIAL}
Gary Wu9abb61c2018-09-27 10:38:50 -070047
48Invalid DMaaP event cannot be converted to PNF_READY notification
49 [Documentation] PRH get invalid event from DMaaP with missing required fields - PRH does not produce PNF_READY notification
50 [Tags] PRH Invalid event
51 [Template] Invalid event processing
Marcin Migdalf969c742019-04-05 11:47:19 +020052 #${EVENT_WITH_MISSING_IPV4_AND_IPV6}
Gary Wu9abb61c2018-09-27 10:38:50 -070053 ${EVENT_WITH_MISSING_SOURCENAME}
Marcin Migdalf969c742019-04-05 11:47:19 +020054 #${EVENT_WITH_MISSING_SOURCENAME_AND_IPV4}
55 #${EVENT_WITH_MISSING_SOURCENAME_AND_IPV6}
56 #${EVENT_WITH_MISSING_SOURCENAME_IPV4_AND_IPV6}
Gary Wu9abb61c2018-09-27 10:38:50 -070057
58Get valid event from DMaaP and record in AAI does not exist
59 [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
60 [Tags] PRH Missing AAI record
61 [Timeout] 30s
62 ${data}= Get Data From File ${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}
63 Set PNF name in AAI wrong_aai_record
64 Set event in DMaaP ${data}
Marcin Migdalb0be3622018-12-18 10:23:09 +010065 Wait Until Keyword Succeeds 100x 300ms Check PRH log |AAIProducerTask exception has been registered
66 Wait Until Keyword Succeeds 100x 300ms Check PRH log |Chain of tasks have been aborted due to errors in PRH workflow
Gary Wu9abb61c2018-09-27 10:38:50 -070067
68Event in DMaaP is not JSON format
69 [Documentation] PRH get not JSON format event from DMaaP - PRH does not produce PNF_READY notification
70 [Tags] PRH
71 ${data}= Get Data From File ${Not_json_format}
72 Set event in DMaaP ${data}
Marcin Migdald70b3bd2019-04-04 11:13:09 +020073 #TODO to fix after CBS merge
74 #Wait Until Keyword Succeeds 100x 300ms Check PRH log |java.lang.IllegalStateException: Not a JSON Array:
Gary Wu9abb61c2018-09-27 10:38:50 -070075
76Get valid event from DMaaP and AAI is not responding
77 [Documentation] PRH get valid event from DMaaP with all required fields and AAI is not responding - PRH does not produce PNF_READY notification
78 [Tags] PRH AAI
79 [Timeout] 180s
80 ${data}= Get Data From File ${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}
pkarasc7abba82018-10-22 12:22:35 +020081 Ensure Container Is Exited aai_simulator
Gary Wu9abb61c2018-09-27 10:38:50 -070082 Set event in DMaaP ${data}
Marcin Migdald70b3bd2019-04-04 11:13:09 +020083 #TODO fix after CBS merge
84 #Wait Until Keyword Succeeds 100x 300ms Check PRH log java.net.UnknownHostException: aai
pkarasc7abba82018-10-22 12:22:35 +020085 Ensure Container Is Running aai_simulator