blob: c60ffe6d75a0b612dfa79af64c05d0c2f2815d8a [file] [log] [blame]
Stavros Kanarakis40c1ddc2019-03-27 19:11:43 +02001*** Settings ***
2Documentation 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.
5Resource resources/bbs_library.robot
6Resource ../../common.robot
7Suite Setup Run keywords Create header AND Create sessions AND Set AAI Records AND Ensure Container Is Running bbs
8Test 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}
mprzybysf3f1b5e2020-03-03 08:31:16 +000014${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
mprzybysf3f1b5e2020-03-03 08:31:16 +000017${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 Kanarakis9f330c22020-03-03 13:47:45 +020019${AUTH_MALFORMED_JSON_FORMAT} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_malformed_json_format.json
mprzybysf3f1b5e2020-03-03 08:31:16 +000020${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 Kanarakis9f330c22020-03-03 13:47:45 +020025${UPDATE_MALFORMED_JSON_FORMAT} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_malformed_json_format.json
mprzybysf3f1b5e2020-03-03 08:31:16 +000026${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 Kanarakis40c1ddc2019-03-27 19:11:43 +020030
31*** Test Cases ***
32Valid 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 Kanarakis40c1ddc2019-03-27 19:11:43 +020039Invalid 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
46Get 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 Kanarakis9f330c22020-03-03 13:47:45 +020054CPE_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 Kanarakis40c1ddc2019-03-27 19:11:43 +020056 [Tags] BBS
Stavros Kanarakis9f330c22020-03-03 13:47:45 +020057 ${data}= Get Data From File ${AUTH_MALFORMED_JSON_FORMAT}
Stavros Kanarakis40c1ddc2019-03-27 19:11:43 +020058 Set event in DMaaP ${data}
Stavros Kanarakis9f330c22020-03-03 13:47:45 +020059 Wait Until Keyword Succeeds 20x 2000ms Check BBS log DMaaP Consumer error: com.google.gson.stream.MalformedJsonException
Stavros Kanarakis40c1ddc2019-03-27 19:11:43 +020060
Stavros Kanarakis9f330c22020-03-03 13:47:45 +020061 # 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 Kanarakis40c1ddc2019-03-27 19:11:43 +020071
72Valid 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
78Invalid 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
85Get 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 Kanarakis9f330c22020-03-03 13:47:45 +020094PNF_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 Kanarakis40c1ddc2019-03-27 19:11:43 +020096 [Tags] BBS
Stavros Kanarakis9f330c22020-03-03 13:47:45 +020097 ${data}= Get Data From File ${UPDATE_MALFORMED_JSON_FORMAT}
Stavros Kanarakis40c1ddc2019-03-27 19:11:43 +020098 Set event in DMaaP ${data}
Stavros Kanarakis9f330c22020-03-03 13:47:45 +020099 Wait Until Keyword Succeeds 20x 2000ms Check BBS log DMaaP Consumer error: com.google.gson.stream.MalformedJsonException
Stavros Kanarakis40c1ddc2019-03-27 19:11:43 +0200100
Stavros Kanarakis9f330c22020-03-03 13:47:45 +0200101 # 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