blob: a0db4b2f82c45fc7338295070726e04a78396ee2 [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
17${AUTH_EVENT_WITH_MISSING_RGMAC} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_event_with_missing_rgmac.json
18${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
19${AUTH_EVENT_WITH_MISSING_SOURCENAME} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_event_with_missing_sourceName.json
20${AUTH_NOT_JSON_FORMAT} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_not_json_format.json
21${AUTH_POLICY} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/auth_policy_with_all_fields.json
22${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
23${UPDATE_EVENT_WITH_WRONG_CORRELATION} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_event_with_wrong_correlation.json
24${UPDATE_EVENT_WITH_MISSING_ATTACHMENT} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_event_with_missing_attachment.json
25${UPDATE_EVENT_WITH_MISSING_CORRELATION} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_event_with_missing_correlation.json
26${UPDATE_NOT_JSON_FORMAT} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_not_json_format.json
27${UPDATE_POLICY} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/json_events/update_policy_with_all_fields.json
28${AAI_PNFS} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/aai_records/aai_pnfs.json
29${AAI_SERVICES} %{WORKSPACE}/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/assets/aai_records/aai_services.json
30${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 +020031
32*** Test Cases ***
33Valid DMaaP CPE_AUTHENTICATION event can trigger Policy
34 [Documentation] BBS get valid CPE_AUTHENTICATION event from DMaaP with required fields - BBS triggers Policy
35 [Tags] BBS Valid CPE_AUTHENTICATION event
36 [Template] Valid auth event processing
37 ${AUTH_EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}
38 ${AUTH_EVENT_WITHOUT_SWVERSION}
39
40Invalid DMaaP CPE_AUTHENTICATION event RG MAC cannot trigger Policy
41 [Documentation] BBS get invalid RG MAC CPE_AUTHENTICATION event from DMaaP with missing required fields - BBS does not trigger Policy
42 [Tags] BBS Invalid RG MAC CPE_AUTHENTICATION event
43 [Template] Invalid rgmac auth event processing
44 ${AUTH_EVENT_WITH_MISSING_RGMAC}
45
46Invalid DMaaP CPE_AUTHENTICATION event cannot trigger Policy
47 [Documentation] BBS get invalid CPE_AUTHENTICATION event from DMaaP with missing required fields - BBS does not trigger Policy
48 [Tags] BBS Invalid CPE_AUTHENTICATION event
49 [Template] Invalid auth event processing
50 ${AUTH_EVENT_WITH_MISSING_STATE}
51 ${AUTH_EVENT_WITH_MISSING_SOURCENAME}
52
53Get valid CPE_AUTHENTICATION event from DMaaP and PNF record in AAI does not exist
54 [Documentation] BBS get valid event from DMaaP with all required fields and in AAI record doesn't exist - BBS does not trigger Policy
55 [Tags] BBS Missing AAI record
56 [Timeout] 30s
57 ${data}= Get Data From File ${AUTH_EVENT_WITH_WRONG_SOURCENAME}
58 Set event in DMaaP ${data}
59 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)
60
61CPE_AUTHENTICATION Event in DMaaP is not JSON format
62 [Documentation] BBS CPE_AUTHENTICATION not JSON format event from DMaaP - BBS does not Trigger Policy
63 [Tags] BBS
64 ${data}= Get Data From File ${AUTH_NOT_JSON_FORMAT}
65 Set event in DMaaP ${data}
66 Wait Until Keyword Succeeds 20x 2000ms Check BBS log DMaaP Consumption Exception: Not a JSON Array:
67
68# Get valid CPE_AUTHENTICATION event from DMaaP and AAI is not responding
69# [Documentation] BBS get valid CPE_AUTHENTICATION event from DMaaP with all required fields and AAI is not responding - BBS does not trigger Policy
70# [Tags] BBS AAI Uses containers
71# [Timeout] 180s
72# ${data}= Get Data From File ${AUTH_EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}
73# Ensure Container Is Exited aai_simulator
74# Set event in DMaaP ${data}
75# Wait Until Keyword Succeeds 20x 2000ms Check BBS log Error while retrieving PNF: aai_simulator: Try again
76# Ensure Container Is Running aai_simulator
77# Set AAI Records
78
79Valid DMaaP PNF_UPDATE event can trigger Policy
80 [Documentation] BBS get valid PNF_UPDATE event from DMaaP with required fields - BBS triggers Policy
81 [Tags] BBS Valid PNF_UPDATE event
82 [Template] Valid update event processing
83 ${UPDATE_EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}
84
85Invalid DMaaP PNF_UPDATE event cannot trigger Policy
86 [Documentation] BBS get invalid PNF_UPDATE event from DMaaP with missing required fields - BBS does not trigger Policy
87 [Tags] BBS Invalid PNF_UPDATE event
88 [Template] Invalid update event processing
89 ${UPDATE_EVENT_WITH_MISSING_ATTACHMENT}
90 ${UPDATE_EVENT_WITH_MISSING_CORRELATION}
91
92Get valid PNF_UPDATE event from DMaaP and PNF record in AAI does not exist
93 [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
94 [Tags] BBS Missing AAI record
95 [Timeout] 30s
96 ${data}= Get Data From File ${UPDATE_EVENT_WITH_WRONG_CORRELATION}
97 Set event in DMaaP ${data}
98 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)
99
100
101PNF_UPDATE Event in DMaaP is not JSON format
102 [Documentation] BBS PNF_UPDATE not JSON format event from DMaaP - BBS does not Trigger Policy
103 [Tags] BBS
104 ${data}= Get Data From File ${UPDATE_NOT_JSON_FORMAT}
105 Set event in DMaaP ${data}
106 Wait Until Keyword Succeeds 20x 2000ms Check BBS log DMaaP Consumption Exception: Not a JSON Array:
107
108# Get valid PNF_UPDATE event from DMaaP and AAI is not responding
109# [Documentation] BBS get valid PNF_UPDATE event from DMaaP with all required fields and AAI is not responding - BBS does not trigger Policy
110# [Tags] BBS AAI Uses containers
111# [Timeout] 180s
112# ${data}= Get Data From File ${UPDATE_EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}
113# Ensure Container Is Exited aai_simulator
114# Set event in DMaaP ${data}
115# Wait Until Keyword Succeeds 20x 2000ms Check BBS log Error while retrieving PNF: aai_simulator: Try again
116# Ensure Container Is Running aai_simulator
117# Set AAI Records