Skip to content

Commit 41bae6a

Browse files
authored
Merge branch 'main' into requirement_test/CIM_4_20_DM_update
2 parents b32c52a + 0997dc8 commit 41bae6a

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ repos:
1919
hooks:
2020
- id: check-merge-conflict
2121
- repo: https://github.com/psf/black
22-
rev: 21.8b0
22+
rev: 21.9b0
2323
hooks:
2424
- id: black

actionlint

3.88 MB
Binary file not shown.

pytest_splunk_addon/standard_lib/requirement_tests/test_templates.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ def datamodel_check_test(self, keyValue_dict_SPL, requrement_file_model_list):
106106
lis_extra_extracted_splunkside,
107107
list_extra_datamodel_requirement_file,
108108
) = self.compare_datamodel(requrement_file_model_list, datamodel_based_on_tag)
109-
return list_extra_datamodel_requirement_file, lis_extra_extracted_splunkside, datamodel_based_on_tag
109+
return (
110+
list_extra_datamodel_requirement_file,
111+
lis_extra_extracted_splunkside,
112+
datamodel_based_on_tag,
113+
)
110114

111115
def remove_empty_keys(self, event):
112116
event = re.sub(
@@ -138,7 +142,7 @@ def test_requirement_params(
138142
host = modinput_params["host"]
139143
source = modinput_params["source"]
140144
sourcetype = modinput_params["sourcetype"]
141-
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 * "
142146
else:
143147
search = f"search index=* {escaped_event} |fields * "
144148
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)