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
body: '{"description":"Metric SLO using sli_specification","name":"Test-Create_a_new_metric_SLO_object_using_bad_events_formula_returns_OK_response-1772041538","sli_specification":{"count":{"bad_events_formula":{"formula":"query2"},"good_events_formula":{"formula":"query1
Copy file name to clipboardExpand all lines: tests/v1/features/service_level_objectives.feature
+14-1Lines changed: 14 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,19 @@ Feature: Service Level Objectives
48
48
When the request is sent
49
49
Then the response status is 200 OK
50
50
51
+
@team:DataDog/slo-app
52
+
Scenario: Create a new metric SLO object using bad events formula returns "OK" response
53
+
Given new "CreateSLO" request
54
+
And body with value {"type":"metric","description":"Metric SLO using sli_specification","name":"{{ unique }}","sli_specification":{"count":{"good_events_formula":{"formula":"query1 - query2"},"bad_events_formula":{"formula":"query2"},"queries":[{"data_source":"metrics","name":"query1","query":"sum:httpservice.hits{*}.as_count()"},{"data_source":"metrics","name":"query2","query":"sum:httpservice.errors{*}.as_count()"}]}},"tags":["env:prod","type:count"],"thresholds":[{"target":99.0,"target_display":"99.0","timeframe":"7d","warning":99.5,"warning_display":"99.5"}],"timeframe":"7d","target_threshold":99.0,"warning_threshold":99.5}
55
+
When the request is sent
56
+
Then the response status is 200 OK
57
+
And the response "data[0]" has field "sli_specification"
58
+
And the response "data[0].sli_specification" has field "count"
59
+
And the response "data[0].sli_specification.count" has field "good_events_formula"
60
+
And the response "data[0].sli_specification.count" has field "bad_events_formula"
61
+
And the response "data[0].sli_specification.count" has field "queries"
62
+
And the response "data[0].sli_specification.count.queries" has length 2
63
+
51
64
@team:DataDog/slo-app
52
65
Scenario: Create a new metric SLO object using sli_specification returns "OK" response
53
66
Given new "CreateSLO" request
@@ -247,7 +260,7 @@ Feature: Service Level Objectives
247
260
Scenario: Update an SLO returns "Not Found" response
248
261
Given new "UpdateSLO" request
249
262
And request contains "slo_id" parameter from "REPLACE.ME"
0 commit comments