Skip to content

Commit 35ff77f

Browse files
authored
fix: RFC3164 regex updated (#479)
1 parent e31eeaf commit 35ff77f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pytest_splunk_addon/standard_lib/requirement_tests/test_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def strip_syslog_header(self, raw_event):
9797
stripped_header = regex_rfc5424.group(3)
9898
return stripped_header
9999
regex_rfc3164 = re.search(
100-
r"([A-Z][a-z][a-z]\s{1,2}\d{1,2}\s\d{2}[:]\d{2}[:]\d{2})\s+([\w][\w\d\.@-]*)\s(.*)$",
100+
r"([A-Z][a-z][a-z]\s{1,2}\d{1,2}\s\d{2}[:]\d{2}[:]\d{2})\s+([\w][\w\d\.@-]*)\s\w*:?(.*)$",
101101
raw_event,
102102
)
103103
if regex_rfc3164:

tests/unit/tests_standard_lib/test_requirement_tests/test_test_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def test_extract_params():
106106
["requirement.log"],
107107
[True],
108108
["syslog"],
109-
{"event": ["<34>Oct 11 22:14:15 machine1 event_1"]},
109+
{"event": ["<34>Oct 11 22:14:15 machine1 pr1:event_1"]},
110110
[["model_1:dataset_1", "model_2:dataset_2"]],
111111
[{"field1": "value1", "field2": "value2"}, {"field3": "value3"}],
112112
[

0 commit comments

Comments
 (0)