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: features/v2/scorecards.feature
+39-39Lines changed: 39 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -9,28 +9,28 @@ Feature: Scorecards
9
9
And a valid "appKeyAuth" key in the system
10
10
And an instance of "Scorecards" API
11
11
12
-
@generated@skip@team:DataDog/service-catalog
12
+
@generated@skip@team:DataDog/idp
13
13
Scenario: Create a new campaign returns "Bad Request" response
14
14
Given new "CreateScorecardCampaign" request
15
15
And body with value {"data": {"attributes": {"description": "Campaign to improve security posture for Q1 2024.", "due_date": "2024-03-31T23:59:59Z", "entity_scope": "kind:service AND team:platform", "guidance": "Please ensure all services pass the security requirements.", "key": "q1-security-2024", "name": "Q1 Security Campaign", "owner_id": "550e8400-e29b-41d4-a716-446655440000", "rule_ids": ["q8MQxk8TCqrHnWkx", "r9NRyl9UDrsIoXly"], "start_date": "2024-01-01T00:00:00Z", "status": "in_progress"}, "type": "campaign"}}
16
16
When the request is sent
17
17
Then the response status is 400 Bad Request
18
18
19
-
@generated@skip@team:DataDog/service-catalog
19
+
@generated@skip@team:DataDog/idp
20
20
Scenario: Create a new campaign returns "Created" response
21
21
Given new "CreateScorecardCampaign" request
22
22
And body with value {"data": {"attributes": {"description": "Campaign to improve security posture for Q1 2024.", "due_date": "2024-03-31T23:59:59Z", "entity_scope": "kind:service AND team:platform", "guidance": "Please ensure all services pass the security requirements.", "key": "q1-security-2024", "name": "Q1 Security Campaign", "owner_id": "550e8400-e29b-41d4-a716-446655440000", "rule_ids": ["q8MQxk8TCqrHnWkx", "r9NRyl9UDrsIoXly"], "start_date": "2024-01-01T00:00:00Z", "status": "in_progress"}, "type": "campaign"}}
23
23
When the request is sent
24
24
Then the response status is 201 Created
25
25
26
-
@team:DataDog/service-catalog
26
+
@team:DataDog/idp
27
27
Scenario: Create a new rule returns "Bad Request" response
28
28
Given new "CreateScorecardRule" request
29
29
And body with value {"data": {"attributes": {"enabled": true, "level": 2, "name": "Team Defined", "scorecard_id": "NOT.FOUND"}, "type": "rule"}}
30
30
When the request is sent
31
31
Then the response status is 400 Bad Request
32
32
33
-
@team:DataDog/service-catalog
33
+
@team:DataDog/idp
34
34
Scenario: Create a new rule returns "Created" response
35
35
Given new "CreateScorecardRule" request
36
36
And body with value {"data": {"attributes": {"enabled": true, "name": "{{unique}}", "scorecard_name": "Observability Best Practices"}, "type": "rule"}}
@@ -39,7 +39,7 @@ Feature: Scorecards
39
39
And the response "data.attributes.scorecard_name" is equal to "Observability Best Practices"
40
40
And the response "data.relationships.scorecard.data" has field "id"
Given there is a valid "create_scorecard_rule" in the system
203
203
And new "UpdateScorecardOutcomes" request
204
204
And body with value {"data": {"attributes": {"results": [{"rule_id": "{{create_scorecard_rule.data.id}}", "entity_reference": "service:my-service", "remarks": "See: <a href=\"https://app.datadoghq.com/services\">Services</a>", "state": "pass"}]}, "type": "batched-outcome"}}
And body with value {"data": {"attributes": {"results": [{"rule_id": "INVALID.RULE_ID", "entity_reference": "service:my-service", "remarks": "See: <a href=\"https://app.datadoghq.com/services\">Services</a>", "state": "pass"}]}, "type": "batched-outcome"}}
And body with value {"data": {"attributes": {"results": [{"entity_reference": "service:my-service", "remarks": "See: <a href=\"https://app.datadoghq.com/services\">Services</a>", "rule_id": "q8MQxk8TCqrHnWkx", "state": "pass"}]}, "type": "batched-outcome"}}
And body with value {"data": {"attributes": {"results": [{"entity_reference": "service:my-service", "remarks": "See: <a href=\"https://app.datadoghq.com/services\">Services</a>", "rule_id": "q8MQxk8TCqrHnWkx", "state": "pass"}]}, "type": "batched-outcome"}}
And body with value {"data": {"attributes": {"results": [{"entity_reference": "service:my-service", "remarks": "See: <a href=\"https://app.datadoghq.com/services\">Services</a>", "rule_id": "q8MQxk8TCqrHnWkx", "state": "pass"}]}, "type": "batched-outcome"}}
244
244
When the request is sent
245
245
Then the response status is 409 Conflict
246
246
247
-
@generated@skip@team:DataDog/service-catalog
247
+
@generated@skip@team:DataDog/idp
248
248
Scenario: Update a campaign returns "Bad Request" response
249
249
Given new "UpdateScorecardCampaign" request
250
250
And request contains "campaign_id" parameter from "REPLACE.ME"
251
251
And body with value {"data": {"attributes": {"description": "Campaign to improve security posture for Q1 2024.", "due_date": "2024-03-31T23:59:59Z", "entity_scope": "kind:service AND team:platform", "guidance": "Please ensure all services pass the security requirements.", "key": "q1-security-2024", "name": "Q1 Security Campaign", "owner_id": "550e8400-e29b-41d4-a716-446655440000", "rule_ids": ["q8MQxk8TCqrHnWkx", "r9NRyl9UDrsIoXly"], "start_date": "2024-01-01T00:00:00Z", "status": "in_progress"}, "type": "campaign"}}
252
252
When the request is sent
253
253
Then the response status is 400 Bad Request
254
254
255
-
@generated@skip@team:DataDog/service-catalog
255
+
@generated@skip@team:DataDog/idp
256
256
Scenario: Update a campaign returns "Not Found" response
257
257
Given new "UpdateScorecardCampaign" request
258
258
And request contains "campaign_id" parameter from "REPLACE.ME"
259
259
And body with value {"data": {"attributes": {"description": "Campaign to improve security posture for Q1 2024.", "due_date": "2024-03-31T23:59:59Z", "entity_scope": "kind:service AND team:platform", "guidance": "Please ensure all services pass the security requirements.", "key": "q1-security-2024", "name": "Q1 Security Campaign", "owner_id": "550e8400-e29b-41d4-a716-446655440000", "rule_ids": ["q8MQxk8TCqrHnWkx", "r9NRyl9UDrsIoXly"], "start_date": "2024-01-01T00:00:00Z", "status": "in_progress"}, "type": "campaign"}}
260
260
When the request is sent
261
261
Then the response status is 404 Not Found
262
262
263
-
@generated@skip@team:DataDog/service-catalog
263
+
@generated@skip@team:DataDog/idp
264
264
Scenario: Update a campaign returns "OK" response
265
265
Given new "UpdateScorecardCampaign" request
266
266
And request contains "campaign_id" parameter from "REPLACE.ME"
267
267
And body with value {"data": {"attributes": {"description": "Campaign to improve security posture for Q1 2024.", "due_date": "2024-03-31T23:59:59Z", "entity_scope": "kind:service AND team:platform", "guidance": "Please ensure all services pass the security requirements.", "key": "q1-security-2024", "name": "Q1 Security Campaign", "owner_id": "550e8400-e29b-41d4-a716-446655440000", "rule_ids": ["q8MQxk8TCqrHnWkx", "r9NRyl9UDrsIoXly"], "start_date": "2024-01-01T00:00:00Z", "status": "in_progress"}, "type": "campaign"}}
268
268
When the request is sent
269
269
Then the response status is 200 OK
270
270
271
-
@team:DataDog/service-catalog
271
+
@team:DataDog/idp
272
272
Scenario: Update an existing rule returns "Rule updated successfully" response
273
273
Given there is a valid "create_scorecard_rule" in the system
274
274
And new "UpdateScorecardRule" request
@@ -277,7 +277,7 @@ Feature: Scorecards
277
277
When the request is sent
278
278
Then the response status is 200 Rule updated successfully
279
279
280
-
@team:DataDog/service-catalog
280
+
@team:DataDog/idp
281
281
Scenario: Update an existing scorecard rule returns "Bad Request" response
282
282
Given there is a valid "create_scorecard_rule" in the system
283
283
And new "UpdateScorecardRule" request
@@ -286,15 +286,15 @@ Feature: Scorecards
286
286
When the request is sent
287
287
Then the response status is 400 Bad Request
288
288
289
-
@team:DataDog/service-catalog
289
+
@team:DataDog/idp
290
290
Scenario: Update an existing scorecard rule returns "Not Found" response
291
291
Given new "UpdateScorecardRule" request
292
292
And request contains "rule_id" parameter with value "REPLACE.ME"
293
293
And body with value {"data": {"attributes": {"enabled": true, "level": 2, "name": "Team Defined", "scorecard_name": "Deployments automated via Deployment Trains"}, "type": "rule"}}
0 commit comments