File tree Expand file tree Collapse file tree 4 files changed +30
-3
lines changed
addons/TA_transition_from_req/samples Expand file tree Collapse file tree 4 files changed +30
-3
lines changed Original file line number Diff line number Diff line change @@ -268,7 +268,10 @@ def generate_recommended_fields_tests(self):
268268 3. yield object with datamodel, dataset, cim_version and list of fields
269269 """
270270 for event in self .tokenized_events :
271- if not event .requirement_test_data :
271+ if (
272+ not event .requirement_test_data
273+ or event .requirement_test_data .keys () == {"other_fields" }
274+ ):
272275 continue
273276 for _ , datamodels in event .requirement_test_data ["datamodels" ].items ():
274277 if type (datamodels ) is not list :
Original file line number Diff line number Diff line change @@ -160,7 +160,10 @@ def generate_requirements_datamodels_tests(self):
160160 pytest.params for the test templates
161161 """
162162 for event in self .tokenized_events :
163- if not event .requirement_test_data :
163+ if (
164+ not event .requirement_test_data
165+ or event .requirement_test_data .keys () == {"other_fields" }
166+ ):
164167 continue
165168 if event .metadata .get ("input_type" , "" ).startswith ("syslog" ):
166169 stripped_event = xml_event_parser .strip_syslog_header (event .event )
Original file line number Diff line number Diff line change 3030 <field name =" vendor_product" value =" Pytest Splunk Addon" />
3131 </other_mappings >
3232 </event >
33- </device >
33+ <event code =" " name =" UnmappedEvent" format =" " >
34+ <transport type =" modinput" sourcetype =" test:data:1" source =" test_data.1" host =" so1" />
35+ <source >
36+ <jira id =" " />
37+ <comment >lab</comment >
38+ </source >
39+ <raw ><![CDATA[ 2021-12-31 15:15:30,340+0000 ip=1.1.1.1 tester=admin result=failed]]> </raw >
40+ <cim >
41+ </cim >
42+ <other_mappings >
43+ <field name =" action" value =" failed" />
44+ <field name =" status" value =" OTHER" />
45+ <field name =" app" value =" psa" />
46+ <field name =" src" value =" 1.1.1.1" />
47+ <field name =" user" value =" admin" />
48+ <field name =" dest" value =" so1" />
49+ <field name =" vendor_product" value =" Pytest Splunk Addon" />
50+ </other_mappings >
51+ </event >
52+ </device >
Original file line number Diff line number Diff line change 771771 "*test_splunk_app_req.py::Test_App::test_indextime_time[test:data:1::* PASSED*" ,
772772 "*test_splunk_app_req.py::Test_App::test_indextime_time[test:data:1::* PASSED*" ,
773773 "*test_splunk_app_req.py::Test_App::test_indextime_time[test:data:1::* PASSED*" ,
774+ "*test_splunk_app_req.py::Test_App::test_indextime_time[test:data:1::* PASSED*" ,
774775 "*test_splunk_app_req.py::Test_App::test_indextime_line_breaker[test:data:1::sample_modinput.xml* PASSED*" ,
775776 '*test_splunk_app_req.py::Test_App::test_cim_required_fields[eventtype="test_auth"::Authentication* PASSED*' ,
776777 '*test_splunk_app_req.py::Test_App::test_cim_required_fields[eventtype="test_auth"::Authentication::action* PASSED*' ,
802803 "*test_splunk_app_req.py::Test_App::test_requirements_fields[sample_name::sample_modinput.xml::host::so1-4* PASSED*" ,
803804 "*test_splunk_app_req.py::Test_App::test_requirements_fields[sample_name::sample_modinput.xml::host::so1-5* PASSED*" ,
804805 "*test_splunk_app_req.py::Test_App::test_requirements_fields[sample_name::sample_modinput.xml::host::so1-6* PASSED*" ,
806+ "*test_splunk_app_req.py::Test_App::test_requirements_fields[sample_name::sample_modinput.xml::host::so1* PASSED*" ,
805807 "*test_splunk_app_req.py::Test_App::test_props_fields_no_dash_not_empty[test:data:1::field::action* PASSED*" ,
806808 "*test_splunk_app_req.py::Test_App::test_props_fields_no_dash_not_empty[test:data:1::field::app* PASSED*" ,
807809 "*test_splunk_app_req.py::Test_App::test_props_fields_no_dash_not_empty[test:data:1::field::dest* PASSED*" ,
You can’t perform that action at this time.
0 commit comments