Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Integration tests for PRH. |
| 3 | ... PRH receive events from DMaaP and produce or not PNF_READY notification depends on required fields in received event. |
pkaras | c7abba8 | 2018-10-22 12:22:35 +0200 | [diff] [blame] | 4 | Suite Setup Run keywords Create header AND Create sessions AND Ensure Container Is Running prh AND Ensure Container Is Exited ssl_prh |
| 5 | Suite Teardown Ensure Container Is Running ssl_prh |
| 6 | Test Teardown Reset Simulators |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 7 | Library resources/PrhLibrary.py |
| 8 | Resource resources/prh_library.robot |
| 9 | Resource ../../common.robot |
| 10 | |
| 11 | *** Variables *** |
pkaras | c7abba8 | 2018-10-22 12:22:35 +0200 | [diff] [blame] | 12 | ${DMAAP_SIMULATOR_SETUP_URL} http://${DMAAP_SIMULATOR_SETUP} |
pkaras | 55d3686 | 2018-10-17 15:08:34 +0200 | [diff] [blame] | 13 | ${AAI_SIMULATOR_SETUP_URL} http://${AAI_SIMULATOR_SETUP} |
Marcin Migdal | f969c74 | 2019-04-05 11:47:19 +0200 | [diff] [blame] | 14 | |
| 15 | ${VES_EVENT_PNF_REGISTRATION_SIMPLE} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/ves-event-pnf-registration-simple.json |
Marcin Migdal | 26125b1 | 2019-04-11 16:17:18 +0200 | [diff] [blame^] | 16 | ${AAI_PNF_REGISTRATION_SIMPLE} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/aai-pnf-registration-simple.json |
Gary Wu | 13111e9 | 2018-09-27 11:31:33 -0700 | [diff] [blame] | 17 | ${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_all_fields.json |
| 18 | ${EVENT_WITH_IPV4} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_IPV4.json |
| 19 | ${EVENT_WITH_IPV6} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_IPV6.json |
| 20 | ${EVENT_WITH_MISSING_IPV4_AND_IPV6} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_IPV4_and_IPV6.json |
| 21 | ${EVENT_WITH_MISSING_SOURCENAME} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName.json |
| 22 | ${EVENT_WITH_MISSING_SOURCENAME_AND_IPV4} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV4.json |
| 23 | ${EVENT_WITH_MISSING_SOURCENAME_AND_IPV6} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_and_IPV6.json |
| 24 | ${EVENT_WITH_MISSING_SOURCENAME_IPV4_AND_IPV6} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_missing_sourceName_IPV4_and_IPV6.json |
Marcin Migdal | 183c896 | 2019-02-13 15:43:12 +0100 | [diff] [blame] | 25 | ${EVENT_WITH_OPTIONAL_REGISTRATION_FIELDS_ALL_FILLED} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_all_filled.json |
| 26 | ${EVENT_WITH_OPTIONAL_REGISTRATION_FIELDS_EMPTY} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_empty.json |
| 27 | ${EVENT_WITH_OPTIONAL_REGISTRATION_FIELDS_MISSING_ALL} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_missing_all.json |
| 28 | ${EVENT_WITH_OPTIONAL_REGISTRATION_FIELDS_MISSING_PARTIAL} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_optional_registration_fields_missing_partial.json |
Mariusz Wagner | 1fd732a | 2018-09-28 09:03:08 +0200 | [diff] [blame] | 29 | ${EVENT_WITHOUT_IPV6_FILED} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_without_IPV6_field.json |
Gary Wu | 13111e9 | 2018-09-27 11:31:33 -0700 | [diff] [blame] | 30 | ${Not_json_format} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/not_json_format.json |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 31 | |
| 32 | *** Test Cases *** |
Marcin Migdal | 26125b1 | 2019-04-11 16:17:18 +0200 | [diff] [blame^] | 33 | Process valid simple PNF Registration DMaaP event which can be converted to PNF_READY notification |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 34 | [Documentation] PRH get valid event from DMaaP with required fields - PRH produce PNF_READY notification |
| 35 | [Tags] PRH Valid event |
| 36 | [Template] Valid event processing |
Marcin Migdal | 26125b1 | 2019-04-11 16:17:18 +0200 | [diff] [blame^] | 37 | ${VES_EVENT_PNF_REGISTRATION_SIMPLE} ${AAI_PNF_REGISTRATION_SIMPLE} |
Marcin Migdal | f969c74 | 2019-04-05 11:47:19 +0200 | [diff] [blame] | 38 | #${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS} |
| 39 | #${EVENT_WITH_IPV4} |
| 40 | #${EVENT_WITH_IPV6} |
| 41 | #${EVENT_WITHOUT_IPV6_FILED} |
| 42 | #${EVENT_WITH_OPTIONAL_REGISTRATION_FIELDS_ALL_FILLED} |
| 43 | #${EVENT_WITH_OPTIONAL_REGISTRATION_FIELDS_EMPTY} |
| 44 | #${EVENT_WITH_OPTIONAL_REGISTRATION_FIELDS_MISSING_ALL} |
| 45 | #${EVENT_WITH_OPTIONAL_REGISTRATION_FIELDS_MISSING_PARTIAL} |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 46 | |
| 47 | Invalid DMaaP event cannot be converted to PNF_READY notification |
| 48 | [Documentation] PRH get invalid event from DMaaP with missing required fields - PRH does not produce PNF_READY notification |
| 49 | [Tags] PRH Invalid event |
| 50 | [Template] Invalid event processing |
Marcin Migdal | f969c74 | 2019-04-05 11:47:19 +0200 | [diff] [blame] | 51 | #${EVENT_WITH_MISSING_IPV4_AND_IPV6} |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 52 | ${EVENT_WITH_MISSING_SOURCENAME} |
Marcin Migdal | f969c74 | 2019-04-05 11:47:19 +0200 | [diff] [blame] | 53 | #${EVENT_WITH_MISSING_SOURCENAME_AND_IPV4} |
| 54 | #${EVENT_WITH_MISSING_SOURCENAME_AND_IPV6} |
| 55 | #${EVENT_WITH_MISSING_SOURCENAME_IPV4_AND_IPV6} |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 56 | |
| 57 | Get valid event from DMaaP and record in AAI does not exist |
| 58 | [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 |
| 59 | [Tags] PRH Missing AAI record |
| 60 | [Timeout] 30s |
| 61 | ${data}= Get Data From File ${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS} |
| 62 | Set PNF name in AAI wrong_aai_record |
| 63 | Set event in DMaaP ${data} |
Marcin Migdal | b0be362 | 2018-12-18 10:23:09 +0100 | [diff] [blame] | 64 | Wait Until Keyword Succeeds 100x 300ms Check PRH log |AAIProducerTask exception has been registered |
| 65 | Wait Until Keyword Succeeds 100x 300ms Check PRH log |Chain of tasks have been aborted due to errors in PRH workflow |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 66 | |
| 67 | Event in DMaaP is not JSON format |
| 68 | [Documentation] PRH get not JSON format event from DMaaP - PRH does not produce PNF_READY notification |
| 69 | [Tags] PRH |
| 70 | ${data}= Get Data From File ${Not_json_format} |
| 71 | Set event in DMaaP ${data} |
Marcin Migdal | d70b3bd | 2019-04-04 11:13:09 +0200 | [diff] [blame] | 72 | #TODO to fix after CBS merge |
| 73 | #Wait Until Keyword Succeeds 100x 300ms Check PRH log |java.lang.IllegalStateException: Not a JSON Array: |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 74 | |
| 75 | Get valid event from DMaaP and AAI is not responding |
| 76 | [Documentation] PRH get valid event from DMaaP with all required fields and AAI is not responding - PRH does not produce PNF_READY notification |
| 77 | [Tags] PRH AAI |
| 78 | [Timeout] 180s |
| 79 | ${data}= Get Data From File ${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS} |
pkaras | c7abba8 | 2018-10-22 12:22:35 +0200 | [diff] [blame] | 80 | Ensure Container Is Exited aai_simulator |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 81 | Set event in DMaaP ${data} |
Marcin Migdal | d70b3bd | 2019-04-04 11:13:09 +0200 | [diff] [blame] | 82 | #TODO fix after CBS merge |
| 83 | #Wait Until Keyword Succeeds 100x 300ms Check PRH log java.net.UnknownHostException: aai |
pkaras | c7abba8 | 2018-10-22 12:22:35 +0200 | [diff] [blame] | 84 | Ensure Container Is Running aai_simulator |