Skip to content

Commit

Permalink
fix: unit test addopted to the change
Browse files Browse the repository at this point in the history
  • Loading branch information
hsekowski-splunk committed Feb 18, 2022
1 parent 3ccf59c commit 85717f6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def generate_cim_req_params(self):
for file1 in os.listdir(req_file_path):
filename = os.path.join(req_file_path, file1)
LOGGER.info(filename)
if filename.endswith(".log") or filename.endswith(".log"):
if filename.endswith(".log") or filename.endswith(".xml"):
try:
self.check_xml_format(filename)
except Exception:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,27 @@ def test_extract_params():
["requirement.xml"],
[True],
["syslog"],
{"event": ["event_1", "event_2"]},
[["model_1:dataset_1", "model_2:dataset_2"], ["model_3:dataset_3"]],
["event_name_2"],
{"event": ["<34>Oct 11 22:14:15 machine1 pr1:event_1"]},
[["model_1:dataset_1", "model_2:dataset_2"]],
["event_name_1"],
[{"field1": "value1", "field2": "value2"}, {"field3": "value3"}],
[],
[
(
{
"model_list": [
("model_1", "dataset_1", ""),
("model_2", "dataset_2", ""),
],
"escaped_event": "event_1",
"exceptions_dict": {"field3": "value3"},
"Key_value_dict": {"field1": "value1", "field2": "value2"},
"modinput_params": None,
"transport_type": "syslog",
},
"model_1:dataset_1 "
"model_2:dataset_2::fake_path/requirement.log::event_no::1::event_name::event_name_1",
),
],
),
(
["req.log"],
Expand Down

0 comments on commit 85717f6

Please sign in to comment.