Skip to content

Commit 66e0e96

Browse files
authored
fix: Add NOT to escape chars as spl special char (#536)
* fix: Add NOT to escape chars as spl special char * test: Add to test NOT keyword
1 parent e947cb2 commit 66e0e96

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

pytest_splunk_addon/standard_lib/requirement_tests/test_generator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ def escape_char_event(self, event):
328328
"OVER",
329329
"WHERE",
330330
"LIKE",
331+
"NOT",
331332
]
332333
event = event.replace("\\", "\\\\")
333334
bounded_asterisk = re.search(

tests/requirement_test_scripted/sample_requirement_test_scripted.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<comment>Unix service information. Data is collected from live instance. Data is generated from systemctl command. </comment>
1414
</source>
1515
<raw>
16-
<![CDATA[Tue May 26 01:38:02 PDT 2020 type=systemctl UNIT=whoopsie.service, LOADED=not-found, ACTIVE=inactive, SUB=dead, DESCRIPTION="whoopsie.service"]]>
16+
<![CDATA[Tue May 26 01:38:02 PDT 2020 type=systemctl UNIT=whoopsie.service, LOADED= NOT -found, ACTIVE=inactive, SUB=dead, DESCRIPTION="whoopsie.service"]]>
1717
</raw>
1818
<cim>
1919
<models>

tests/unit/tests_standard_lib/test_requirement_tests/test_test_generator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ def test_check_xml_format(et_parse_mock, is_xml_valid, expected_output):
273273
("OVER", "SESSION \\OVER CREATED"),
274274
("WHERE", "SESSION \\WHERE CREATED"),
275275
("LIKE", "SESSION \\LIKE CREATED"),
276+
("NOT", "SESSION \\NOT CREATED"),
276277
],
277278
)
278279
def test_escape_char_event(escape_char, expected_output):

0 commit comments

Comments
 (0)