You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cassettes/features/v2/security_monitoring/Create-a-scheduled-rule-without-rrule-returns-Bad-Request-response.yml
Copy file name to clipboardExpand all lines: features/v2/security_monitoring.feature
+18Lines changed: 18 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -295,6 +295,24 @@ Feature: Security Monitoring
295
295
When the request is sent
296
296
Then the response status is 201 Successfully created the notification rule.
297
297
298
+
@team:DataDog/k9-cloud-security-platform
299
+
Scenario: Create a scheduled detection rule returns "OK" response
300
+
Given new "CreateSecurityMonitoringRule" request
301
+
And body with value {"name":"{{ unique }}", "queries":[{"query":"@test:true","aggregation":"count","groupByFields":[],"distinctFields":[],"index":"main"}],"filters":[],"cases":[{"name":"","status":"info","condition":"a > 0","notifications":[]}],"options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"message":"Test rule","tags":[],"isEnabled":true, "type":"log_detection", "schedulingOptions": {"rrule": "FREQ=HOURLY;INTERVAL=2;", "start": "2025-06-18T12:00:00", "timezone": "Europe/Paris"}}
302
+
When the request is sent
303
+
Then the response status is 200 OK
304
+
And the response "name" is equal to "{{ unique }}"
305
+
And the response "type" is equal to "log_detection"
306
+
And the response "message" is equal to "Test rule"
307
+
And the response "schedulingOptions" is equal to {"rrule": "FREQ=HOURLY;INTERVAL=2;", "start": "2025-06-18T12:00:00", "timezone": "Europe/Paris"}
308
+
309
+
@team:DataDog/k9-cloud-security-platform
310
+
Scenario: Create a scheduled rule without rrule returns "Bad Request" response
311
+
Given new "CreateSecurityMonitoringRule" request
312
+
And body with value {"name":"{{ unique }}", "queries":[{"query":"@test:true","aggregation":"count","groupByFields":[],"distinctFields":[],"index":"main"}],"filters":[],"cases":[{"name":"","status":"info","condition":"a > 0","notifications":[]}],"options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"message":"Test rule","tags":[],"isEnabled":true, "type":"log_detection", "schedulingOptions": {"start": "2025-06-18T12:00:00", "timezone": "Europe/Paris"}}
0 commit comments