@@ -215,6 +215,7 @@ public void testCreateDetectorForSigmaRuleWithNullCondition() throws IOException
215
215
String workflowId = ((List <String >) detectorMap .get ("workflow_ids" )).get (0 );
216
216
217
217
indexDoc (index , "1" , randomDocWithNullField ());
218
+ indexDoc (index , "2" , randomDoc ());
218
219
219
220
Response executeResponse = executeAlertingWorkflow (workflowId , Collections .emptyMap ());
220
221
@@ -227,6 +228,17 @@ public void testCreateDetectorForSigmaRuleWithNullCondition() throws IOException
227
228
String queryId = docLevelQueryResults .keySet ().stream ().findAny ().get ();
228
229
ArrayList <String > docs = (ArrayList <String >) docLevelQueryResults .get (queryId );
229
230
assertEquals (docs .size (), 1 );
231
+
232
+ indexDoc (index , "3" , randomDoc ());
233
+ Response executeResponse1 = executeAlertingWorkflow (workflowId , Collections .emptyMap ());
234
+
235
+ List <Map <String , Object >> monitorRunResults1 = (List <Map <String , Object >>) entityAsMap (executeResponse1 ).get ("monitor_run_results" );
236
+ assertEquals (1 , monitorRunResults1 .size ());
237
+
238
+ Map <String , Object > docLevelQueryResults1 = ((List <Map <String , Object >>) ((Map <String , Object >) monitorRunResults1 .get (0 ).get ("input_results" )).get ("results" )).get (0 );
239
+ int noOfSigmaRuleMatches1 = docLevelQueryResults1 .size ();
240
+ assertEquals (0 , noOfSigmaRuleMatches1 );
241
+
230
242
}
231
243
232
244
public void testCreateDetectorWithThreatIntelDisabled_updateDetectorWithThreatIntelEnabled () throws IOException {
0 commit comments