Commit f172a89b authored by Paul Graydon's avatar Paul Graydon

wendelin_telecom_test: Add duplicated eNB log ingestion test

parent fd43bb77
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Page" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>test_example_ors_enb_log_with_duplicates</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test_example_ors_enb_log_with_duplicates</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Test ORS Example Log (With Duplicates)</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -68,6 +68,9 @@ class WendelinTelecomTest(SecurityTestCase):
self.test_ors_example_log_invalid_split_2 = {
'log': self.portal.web_page_module.test_example_ors_enb_log_invalid_split_2.getTextContent()
}
self.test_ors_example_log_with_duplicates = {
'log': self.portal.web_page_module.test_example_ors_enb_log_with_duplicates.getTextContent()
}
self.test_ors_example_log_empty = {'log': ""}
# Set up ingestor user for performing ingestions
......@@ -1033,6 +1036,8 @@ class WendelinTelecomTest(SecurityTestCase):
self.test_ors_example_log_invalid_split_1,
self.test_ors_example_log_invalid_split_2
]
elif data_key == "duplicated":
test_ors_example_logs = [self.test_ors_example_log_with_duplicates]
elif data_key == "empty":
test_ors_example_logs = [self.test_ors_example_log_empty]
......@@ -1088,7 +1093,7 @@ class WendelinTelecomTest(SecurityTestCase):
('ul_hi', '<f8')
]
if data_key == "valid":
if data_key in ["valid", "duplicated"]:
e_rab_array_shape = (82,)
e_utran_array_shape = (20992,)
elif data_key == "invalid":
......@@ -1149,7 +1154,19 @@ class WendelinTelecomTest(SecurityTestCase):
# Call the above test, but test with invalid data
self.test_04_1_ingestValidOrsLogDataFromFluentd(data_key="invalid")
def test_04_3_ingestEmptyOrsLogDataFromFluentd(self):
def test_04_3_ingestDuplicatedOrsLogDataFromFluentd(self):
'''
Test an ORS log ingestion where data lines have been duplicated:
simulate a fluentd gateway forwarding invalid ORS logs to the platform.
Check that all items are still valid, as duplicate log lines are removed before
the KPIs are calculated.
Also check the fetching of KPI values through the dedicated API endpoint.
'''
# Call the above test, but test with invalid data
self.test_04_1_ingestValidOrsLogDataFromFluentd(data_key="duplicated")
def test_04_4_ingestEmptyOrsLogDataFromFluentd(self):
'''
Test an empty ORS log ingestion: simulate a fluentd gateway forwarding empty ORS logs to the platform.
Check that all items are valid, but the data arrays remain uninitialized.
......@@ -1159,7 +1176,7 @@ class WendelinTelecomTest(SecurityTestCase):
# Call the above test, but test with empty data
self.test_04_1_ingestValidOrsLogDataFromFluentd(data_key="empty")
def test_04_4_ingestOrsLogDataWithoutTagPrefix(self):
def test_04_5_ingestOrsLogDataWithoutTagPrefix(self):
'''
Simulate an entity trying to send data to the platform for ingestion
without using the 'ors.' tag prefix added by fluentd.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment