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):
268
268
3. yield object with datamodel, dataset, cim_version and list of fields
269
269
"""
270
270
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
+ ):
272
275
continue
273
276
for _ , datamodels in event .requirement_test_data ["datamodels" ].items ():
274
277
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):
160
160
pytest.params for the test templates
161
161
"""
162
162
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
+ ):
164
167
continue
165
168
if event .metadata .get ("input_type" , "" ).startswith ("syslog" ):
166
169
stripped_event = xml_event_parser .strip_syslog_header (event .event )
Original file line number Diff line number Diff line change 30
30
<field name =" vendor_product" value =" Pytest Splunk Addon" />
31
31
</other_mappings >
32
32
</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 771
771
"*test_splunk_app_req.py::Test_App::test_indextime_time[test:data:1::* PASSED*" ,
772
772
"*test_splunk_app_req.py::Test_App::test_indextime_time[test:data:1::* PASSED*" ,
773
773
"*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*" ,
774
775
"*test_splunk_app_req.py::Test_App::test_indextime_line_breaker[test:data:1::sample_modinput.xml* PASSED*" ,
775
776
'*test_splunk_app_req.py::Test_App::test_cim_required_fields[eventtype="test_auth"::Authentication* PASSED*' ,
776
777
'*test_splunk_app_req.py::Test_App::test_cim_required_fields[eventtype="test_auth"::Authentication::action* PASSED*' ,
802
803
"*test_splunk_app_req.py::Test_App::test_requirements_fields[sample_name::sample_modinput.xml::host::so1-4* PASSED*" ,
803
804
"*test_splunk_app_req.py::Test_App::test_requirements_fields[sample_name::sample_modinput.xml::host::so1-5* PASSED*" ,
804
805
"*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*" ,
805
807
"*test_splunk_app_req.py::Test_App::test_props_fields_no_dash_not_empty[test:data:1::field::action* PASSED*" ,
806
808
"*test_splunk_app_req.py::Test_App::test_props_fields_no_dash_not_empty[test:data:1::field::app* PASSED*" ,
807
809
"*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