Skip to content

Commit 0997dc8

Browse files
authored
Merge pull request #412 from splunk/requirement_test/special_char
fix: Ingestion failure where special char in host,source and sourcetype
2 parents c55e262 + 4b2550e commit 0997dc8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pytest_splunk_addon/standard_lib/requirement_tests/test_templates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def test_requirement_params(
142142
host = modinput_params["host"]
143143
source = modinput_params["source"]
144144
sourcetype = modinput_params["sourcetype"]
145-
search = f"search index=* host={host} source={source} sourcetype={sourcetype} {escaped_event}|fields * "
145+
search = f"search index=* host=\"{host}\" source=\"{source}\" sourcetype=\"{sourcetype}\" {escaped_event}|fields * "
146146
else:
147147
search = f"search index=* {escaped_event} |fields * "
148148
ingestion_check = splunk_search_util.checkQueryCountIsGreaterThanZero(

tests/requirement_test_modinput/sample_requirement_test_modinput.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<version id="13.21" />
66
<event code="" name="EventID_19_WmiEvent_(WmiEventFilter_activity_detected)_Change_All_Changes" format="">
77
<version id="" />
8-
<transport type="modinput" host="sample_host" source="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" sourcetype="xmlwineventlog"/>
8+
<transport type="modinput" host="sample_host=test" source="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" sourcetype="xmlwineventlog"/>
99
<source>
1010
<jira id="ADDON-35818 , ADDON-35825" />
1111
<comment />

0 commit comments

Comments
 (0)