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: tests/v2/features/monitors.feature
+10-20Lines changed: 10 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -31,16 +31,14 @@ Feature: Monitors
31
31
32
32
@skip-validation@team:DataDog/monitor-app
33
33
Scenario: Create a monitor notification rule returns "Bad Request" response
34
-
Given operation "CreateMonitorNotificationRule" enabled
35
-
And new "CreateMonitorNotificationRule" request
34
+
Given new "CreateMonitorNotificationRule" request
36
35
And body with value {"data": {"attributes": {"filter": {"tags": ["test:{{ unique_lower }}", "host:abc"]}, "name": "test rule", "recipients": ["@slack-test-channel", "@jira-test"]}, "type": "monitor-notification-rule"}}
37
36
When the request is sent
38
37
Then the response status is 400 Bad Request
39
38
40
39
@team:DataDog/monitor-app
41
40
Scenario: Create a monitor notification rule returns "OK" response
42
-
Given operation "CreateMonitorNotificationRule" enabled
43
-
And new "CreateMonitorNotificationRule" request
41
+
Given new "CreateMonitorNotificationRule" request
44
42
And body with value {"data": {"attributes": {"filter": {"tags": ["test:{{ unique_lower }}"]}, "name": "test rule", "recipients": ["slack-test-channel", "jira-test"]}, "type": "monitor-notification-rule"}}
45
43
When the request is sent
46
44
Then the response status is 200 OK
@@ -86,16 +84,14 @@ Feature: Monitors
86
84
87
85
@team:DataDog/monitor-app
88
86
Scenario: Delete a monitor notification rule returns "Not Found" response
89
-
Given operation "DeleteMonitorNotificationRule" enabled
90
-
And new "DeleteMonitorNotificationRule" request
87
+
Given new "DeleteMonitorNotificationRule" request
91
88
And request contains "rule_id" parameter with value "00000000-0000-1234-0000-000000000000"
92
89
When the request is sent
93
90
Then the response status is 404 Not Found
94
91
95
92
@team:DataDog/monitor-app
96
93
Scenario: Delete a monitor notification rule returns "OK" response
97
-
Given operation "DeleteMonitorNotificationRule" enabled
98
-
And there is a valid "monitor_notification_rule" in the system
94
+
Given there is a valid "monitor_notification_rule" in the system
99
95
And new "DeleteMonitorNotificationRule" request
100
96
And request contains "rule_id" parameter from "monitor_notification_rule.data.id"
101
97
When the request is sent
@@ -170,16 +166,14 @@ Feature: Monitors
170
166
171
167
@team:DataDog/monitor-app
172
168
Scenario: Get a monitor notification rule returns "Not Found" response
173
-
Given operation "GetMonitorNotificationRule" enabled
174
-
And new "GetMonitorNotificationRule" request
169
+
Given new "GetMonitorNotificationRule" request
175
170
And request contains "rule_id" parameter with value "00000000-0000-1234-0000-000000000000"
176
171
When the request is sent
177
172
Then the response status is 404 Not Found
178
173
179
174
@team:DataDog/monitor-app
180
175
Scenario: Get a monitor notification rule returns "OK" response
181
-
Given operation "GetMonitorNotificationRule" enabled
182
-
And there is a valid "monitor_notification_rule" in the system
176
+
Given there is a valid "monitor_notification_rule" in the system
183
177
And new "GetMonitorNotificationRule" request
184
178
And request contains "rule_id" parameter from "monitor_notification_rule.data.id"
185
179
When the request is sent
@@ -218,8 +212,7 @@ Feature: Monitors
218
212
219
213
@team:DataDog/monitor-app
220
214
Scenario: Get all monitor notification rules returns "OK" response
221
-
Given operation "GetMonitorNotificationRules" enabled
222
-
And there is a valid "monitor_notification_rule" in the system
215
+
Given there is a valid "monitor_notification_rule" in the system
223
216
And new "GetMonitorNotificationRules" request
224
217
When the request is sent
225
218
Then the response status is 200 OK
@@ -237,8 +230,7 @@ Feature: Monitors
237
230
238
231
@skip-validation@team:DataDog/monitor-app
239
232
Scenario: Update a monitor notification rule returns "Bad Request" response
240
-
Given operation "UpdateMonitorNotificationRule" enabled
241
-
And there is a valid "monitor_notification_rule" in the system
233
+
Given there is a valid "monitor_notification_rule" in the system
242
234
And new "UpdateMonitorNotificationRule" request
243
235
And request contains "rule_id" parameter from "monitor_notification_rule.data.id"
244
236
And body with value {"data": {"attributes": {"filter": {"tags": ["test:{{ unique_lower }}", "host:abc"]}, "name": "updated rule", "recipients": ["@slack-test-channel"]}, "id": "{{ monitor_notification_rule.data.id }}", "type": "monitor-notification-rule"}}
@@ -247,17 +239,15 @@ Feature: Monitors
247
239
248
240
@team:DataDog/monitor-app
249
241
Scenario: Update a monitor notification rule returns "Not Found" response
250
-
Given operation "UpdateMonitorNotificationRule" enabled
251
-
And new "UpdateMonitorNotificationRule" request
242
+
Given new "UpdateMonitorNotificationRule" request
252
243
And request contains "rule_id" parameter with value "00000000-0000-1234-0000-000000000000"
253
244
And body with value {"data": {"attributes": {"filter": {"tags": ["test:{{ unique_lower }}", "host:abc"]}, "name": "updated rule", "recipients": ["slack-test-channel", "jira-test"]}, "id": "00000000-0000-1234-0000-000000000000", "type": "monitor-notification-rule"}}
254
245
When the request is sent
255
246
Then the response status is 404 Not Found
256
247
257
248
@team:DataDog/monitor-app
258
249
Scenario: Update a monitor notification rule returns "OK" response
259
-
Given operation "UpdateMonitorNotificationRule" enabled
260
-
And there is a valid "monitor_notification_rule" in the system
250
+
Given there is a valid "monitor_notification_rule" in the system
261
251
And new "UpdateMonitorNotificationRule" request
262
252
And request contains "rule_id" parameter from "monitor_notification_rule.data.id"
263
253
And body with value {"data": {"attributes": {"filter": {"tags": ["test:{{ unique_lower }}", "host:abc"]}, "name": "updated rule", "recipients": ["slack-test-channel"]}, "id": "{{ monitor_notification_rule.data.id }}", "type": "monitor-notification-rule"}}
0 commit comments