Stavros Kanarakis | 40c1ddc | 2019-03-27 19:11:43 +0200 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Integration tests for BBS. |
| 3 | ... BBS receives CPE_AUTHENTICATION event from DMaaP and triggers a Policy that updates the CFS service with the PNF. |
| 4 | ... BBS receives PNF_UPDATE event from DMaaP and triggers a Policy that updates the CFS service resources associated with the PNF. |
| 5 | Resource resources/bbs_library.robot |
| 6 | Resource ../../common.robot |
| 7 | Suite Setup Run keywords Create header AND Create sessions AND Set AAI Records AND Ensure Container Is Running bbs |
| 8 | Test Teardown Reset Simulators |
| 9 | |
| 10 | |
| 11 | *** Variables *** |
| 12 | ${DMAAP_SIMULATOR_SETUP_URL} http://${DMAAP_SIMULATOR_SETUP} |
| 13 | ${AAI_SIMULATOR_SETUP_URL} http://${AAI_SIMULATOR_SETUP} |
mprzybys | f3f1b5e | 2020-03-03 08:31:16 +0000 | [diff] [blame] | 14 | ${AUTH_EVENT_WITH_ALL_VALID_REQUIRED_FIELDS} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_event_with_all_fields.json |
| 15 | ${AUTH_EVENT_WITH_WRONG_SOURCENAME} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_event_with_wrong_sourceName.json |
| 16 | ${AUTH_EVENT_WITHOUT_SWVERSION} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_event_without_swversion.json |
mprzybys | f3f1b5e | 2020-03-03 08:31:16 +0000 | [diff] [blame] | 17 | ${AUTH_EVENT_WITH_MISSING_STATE} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_event_with_missing_new_old_state.json |
| 18 | ${AUTH_EVENT_WITH_MISSING_SOURCENAME} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_event_with_missing_sourceName.json |
Stavros Kanarakis | 9f330c2 | 2020-03-03 13:47:45 +0200 | [diff] [blame] | 19 | ${AUTH_MALFORMED_JSON_FORMAT} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_malformed_json_format.json |
mprzybys | f3f1b5e | 2020-03-03 08:31:16 +0000 | [diff] [blame] | 20 | ${AUTH_POLICY} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_policy_with_all_fields.json |
| 21 | ${UPDATE_EVENT_WITH_ALL_VALID_REQUIRED_FIELDS} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_event_with_all_fields.json |
| 22 | ${UPDATE_EVENT_WITH_WRONG_CORRELATION} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_event_with_wrong_correlation.json |
| 23 | ${UPDATE_EVENT_WITH_MISSING_ATTACHMENT} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_event_with_missing_attachment.json |
| 24 | ${UPDATE_EVENT_WITH_MISSING_CORRELATION} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_event_with_missing_correlation.json |
Stavros Kanarakis | 9f330c2 | 2020-03-03 13:47:45 +0200 | [diff] [blame] | 25 | ${UPDATE_MALFORMED_JSON_FORMAT} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_malformed_json_format.json |
mprzybys | f3f1b5e | 2020-03-03 08:31:16 +0000 | [diff] [blame] | 26 | ${UPDATE_POLICY} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_policy_with_all_fields.json |
| 27 | ${AAI_PNFS} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/aai_records/aai_pnfs.json |
| 28 | ${AAI_SERVICES} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/aai_records/aai_services.json |
| 29 | ${AAI_PNF_NOT_FOUND} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/aai_records/aai_pnf_not_found.json |
Stavros Kanarakis | 40c1ddc | 2019-03-27 19:11:43 +0200 | [diff] [blame] | 30 | |
| 31 | *** Test Cases *** |
| 32 | Valid DMaaP CPE_AUTHENTICATION event can trigger Policy |
| 33 | [Documentation] BBS get valid CPE_AUTHENTICATION event from DMaaP with required fields - BBS triggers Policy |
| 34 | [Tags] BBS Valid CPE_AUTHENTICATION event |
| 35 | [Template] Valid auth event processing |
| 36 | ${AUTH_EVENT_WITH_ALL_VALID_REQUIRED_FIELDS} |
| 37 | ${AUTH_EVENT_WITHOUT_SWVERSION} |
| 38 | |
Stavros Kanarakis | 40c1ddc | 2019-03-27 19:11:43 +0200 | [diff] [blame] | 39 | Invalid DMaaP CPE_AUTHENTICATION event cannot trigger Policy |
| 40 | [Documentation] BBS get invalid CPE_AUTHENTICATION event from DMaaP with missing required fields - BBS does not trigger Policy |
| 41 | [Tags] BBS Invalid CPE_AUTHENTICATION event |
| 42 | [Template] Invalid auth event processing |
| 43 | ${AUTH_EVENT_WITH_MISSING_STATE} |
| 44 | ${AUTH_EVENT_WITH_MISSING_SOURCENAME} |
| 45 | |
| 46 | Get valid CPE_AUTHENTICATION event from DMaaP and PNF record in AAI does not exist |
| 47 | [Documentation] BBS get valid event from DMaaP with all required fields and in AAI record doesn't exist - BBS does not trigger Policy |
| 48 | [Tags] BBS Missing AAI record |
| 49 | [Timeout] 30s |
| 50 | ${data}= Get Data From File ${AUTH_EVENT_WITH_WRONG_SOURCENAME} |
| 51 | Set event in DMaaP ${data} |
| 52 | Wait Until Keyword Succeeds 20x 2000ms Check BBS log Error while retrieving PNF: A&AI Request for (/aai/v14/network/pnfs/pnf/Wrong-PNF-Name?depth=all) |
| 53 | |
Stavros Kanarakis | 9f330c2 | 2020-03-03 13:47:45 +0200 | [diff] [blame] | 54 | CPE_AUTHENTICATION Event in DMaaP has malformed JSON format |
| 55 | [Documentation] BBS CPE_AUTHENTICATION has malformed JSON format event from DMaaP - BBS does not Trigger Policy |
Stavros Kanarakis | 40c1ddc | 2019-03-27 19:11:43 +0200 | [diff] [blame] | 56 | [Tags] BBS |
Stavros Kanarakis | 9f330c2 | 2020-03-03 13:47:45 +0200 | [diff] [blame] | 57 | ${data}= Get Data From File ${AUTH_MALFORMED_JSON_FORMAT} |
Stavros Kanarakis | 40c1ddc | 2019-03-27 19:11:43 +0200 | [diff] [blame] | 58 | Set event in DMaaP ${data} |
Stavros Kanarakis | 9f330c2 | 2020-03-03 13:47:45 +0200 | [diff] [blame] | 59 | Wait Until Keyword Succeeds 20x 2000ms Check BBS log DMaaP Consumer error: com.google.gson.stream.MalformedJsonException |
Stavros Kanarakis | 40c1ddc | 2019-03-27 19:11:43 +0200 | [diff] [blame] | 60 | |
Stavros Kanarakis | 9f330c2 | 2020-03-03 13:47:45 +0200 | [diff] [blame] | 61 | # Get valid CPE_AUTHENTICATION event from DMaaP and AAI is not responding |
| 62 | # [Documentation] BBS get valid CPE_AUTHENTICATION event from DMaaP with all required fields and AAI is not responding - BBS does not trigger Policy |
| 63 | # [Tags] BBS AAI Uses containers |
| 64 | # [Timeout] 180s |
| 65 | # ${data}= Get Data From File ${AUTH_EVENT_WITH_ALL_VALID_REQUIRED_FIELDS} |
| 66 | # Ensure Container Is Exited aai_simulator |
| 67 | # Set event in DMaaP ${data} |
| 68 | # Wait Until Keyword Succeeds 20x 2000ms Check BBS log Error while retrieving PNF: aai_simulator: Try again |
| 69 | # Ensure Container Is Running aai_simulator |
| 70 | # Set AAI Records |
Stavros Kanarakis | 40c1ddc | 2019-03-27 19:11:43 +0200 | [diff] [blame] | 71 | |
| 72 | Valid DMaaP PNF_UPDATE event can trigger Policy |
| 73 | [Documentation] BBS get valid PNF_UPDATE event from DMaaP with required fields - BBS triggers Policy |
| 74 | [Tags] BBS Valid PNF_UPDATE event |
| 75 | [Template] Valid update event processing |
| 76 | ${UPDATE_EVENT_WITH_ALL_VALID_REQUIRED_FIELDS} |
| 77 | |
| 78 | Invalid DMaaP PNF_UPDATE event cannot trigger Policy |
| 79 | [Documentation] BBS get invalid PNF_UPDATE event from DMaaP with missing required fields - BBS does not trigger Policy |
| 80 | [Tags] BBS Invalid PNF_UPDATE event |
| 81 | [Template] Invalid update event processing |
| 82 | ${UPDATE_EVENT_WITH_MISSING_ATTACHMENT} |
| 83 | ${UPDATE_EVENT_WITH_MISSING_CORRELATION} |
| 84 | |
| 85 | Get valid PNF_UPDATE event from DMaaP and PNF record in AAI does not exist |
| 86 | [Documentation] BBS get valid PNF_UPDATE event from DMaaP with all required fields and in AAI record doesn't exist - BBS does not trigger Policy |
| 87 | [Tags] BBS Missing AAI record |
| 88 | [Timeout] 30s |
| 89 | ${data}= Get Data From File ${UPDATE_EVENT_WITH_WRONG_CORRELATION} |
| 90 | Set event in DMaaP ${data} |
| 91 | Wait Until Keyword Succeeds 20x 2000ms Check BBS log Error while retrieving PNF: A&AI Request for (/aai/v14/network/pnfs/pnf/Wrong-Correlation-Id?depth=all) |
| 92 | |
| 93 | |
Stavros Kanarakis | 9f330c2 | 2020-03-03 13:47:45 +0200 | [diff] [blame] | 94 | PNF_UPDATE Event in DMaaP has malformed JSON format |
| 95 | [Documentation] BBS PNF_UPDATE has malformed JSON format event from DMaaP - BBS does not Trigger Policy |
Stavros Kanarakis | 40c1ddc | 2019-03-27 19:11:43 +0200 | [diff] [blame] | 96 | [Tags] BBS |
Stavros Kanarakis | 9f330c2 | 2020-03-03 13:47:45 +0200 | [diff] [blame] | 97 | ${data}= Get Data From File ${UPDATE_MALFORMED_JSON_FORMAT} |
Stavros Kanarakis | 40c1ddc | 2019-03-27 19:11:43 +0200 | [diff] [blame] | 98 | Set event in DMaaP ${data} |
Stavros Kanarakis | 9f330c2 | 2020-03-03 13:47:45 +0200 | [diff] [blame] | 99 | Wait Until Keyword Succeeds 20x 2000ms Check BBS log DMaaP Consumer error: com.google.gson.stream.MalformedJsonException |
Stavros Kanarakis | 40c1ddc | 2019-03-27 19:11:43 +0200 | [diff] [blame] | 100 | |
Stavros Kanarakis | 9f330c2 | 2020-03-03 13:47:45 +0200 | [diff] [blame] | 101 | # Get valid PNF_UPDATE event from DMaaP and AAI is not responding |
| 102 | # [Documentation] BBS get valid PNF_UPDATE event from DMaaP with all required fields and AAI is not responding - BBS does not trigger Policy |
| 103 | # [Tags] BBS AAI Uses containers |
| 104 | # [Timeout] 180s |
| 105 | # ${data}= Get Data From File ${UPDATE_EVENT_WITH_ALL_VALID_REQUIRED_FIELDS} |
| 106 | # Ensure Container Is Exited aai_simulator |
| 107 | # Set event in DMaaP ${data} |
| 108 | # Wait Until Keyword Succeeds 20x 2000ms Check BBS log Error while retrieving PNF: aai_simulator: Try again |
| 109 | # Ensure Container Is Running aai_simulator |
| 110 | # Set AAI Records |