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
"text": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Update_an_existing_rule_returns_Rule_updated_successfully_response-1722307632\",\"owner\":\"Datadog\",\"scorecard_name\":\"OpenAPI Spec Test Best Practices\"},\"type\":\"rule\"}}"
"text": "{\"data\":{\"id\":\"L2uJseIxQCRLg_2z\",\"type\":\"rule\",\"attributes\":{\"category\":\"OpenAPI Spec Test Best Practices\",\"created_at\":\"2024-07-30T02:47:13.117302334Z\",\"custom\":true,\"enabled\":true,\"modified_at\":\"2024-07-30T02:47:13.117302334Z\",\"name\":\"Test-Update_an_existing_rule_returns_Rule_updated_successfully_response-1722307632\",\"owner\":\"Datadog\",\"scorecard_name\":\"OpenAPI Spec Test Best Practices\"},\"relationships\":{\"scorecard\":{\"data\":{\"id\":\"qsxpoYRhU_yz\",\"type\":\"scorecard\"}}}}}"
46
+
},
47
+
"cookies": [],
48
+
"headers": [
49
+
{
50
+
"name": "content-type",
51
+
"value": "application/vnd.api+json"
52
+
}
53
+
],
54
+
"headersSize": 525,
55
+
"httpVersion": "HTTP/1.1",
56
+
"redirectURL": "",
57
+
"status": 201,
58
+
"statusText": "Created"
59
+
},
60
+
"startedDateTime": "2024-07-30T02:47:12.980Z",
61
+
"time": 118
62
+
},
63
+
{
64
+
"_id": "c173c2c3af4ee37c6f4319a3182dd04d",
65
+
"_order": 0,
66
+
"cache": {},
67
+
"request": {
68
+
"bodySize": 229,
69
+
"cookies": [],
70
+
"headers": [
71
+
{
72
+
"_fromType": "array",
73
+
"name": "accept",
74
+
"value": "application/json"
75
+
},
76
+
{
77
+
"_fromType": "array",
78
+
"name": "content-type",
79
+
"value": "application/json"
80
+
}
81
+
],
82
+
"headersSize": 585,
83
+
"httpVersion": "HTTP/1.1",
84
+
"method": "PUT",
85
+
"postData": {
86
+
"mimeType": "application/json",
87
+
"params": [],
88
+
"text": "{\"data\":{\"attributes\":{\"description\":\"Updated description via test\",\"enabled\":true,\"name\":\"Test-Update_an_existing_rule_returns_Rule_updated_successfully_response-1722307632\",\"scorecard_name\":\"OpenAPI Spec Test Best Practices\"}}}"
"text": "{\"data\":{\"id\":\"L2uJseIxQCRLg_2z\",\"type\":\"rule\",\"attributes\":{\"category\":\"OpenAPI Spec Test Best Practices\",\"created_at\":\"2024-07-30T02:47:13.117302Z\",\"custom\":true,\"description\":\"Updated description via test\",\"enabled\":true,\"modified_at\":\"2024-07-30T02:47:13.231478Z\",\"name\":\"Test-Update_an_existing_rule_returns_Rule_updated_successfully_response-1722307632\",\"scorecard_name\":\"OpenAPI Spec Test Best Practices\"},\"relationships\":{\"scorecard\":{\"data\":{\"id\":\"qsxpoYRhU_yz\",\"type\":\"scorecard\"}}}}}"
Scenario: Update an existing rule returns "Bad Request" response
126
+
Given operation "UpdateScorecardRule" enabled
127
+
And new "UpdateScorecardRule" request
128
+
And request contains "rule_id" parameter from "REPLACE.ME"
129
+
And body with value {"data": {"attributes": {"enabled": true, "name": "Team Defined", "scorecard_name": "Deployments automated via Deployment Trains"}, "type": "rule"}}
130
+
When the request is sent
131
+
Then the response status is 400 Bad Request
132
+
133
+
@team:DataDog/service-catalog
134
+
Scenario: Update an existing rule returns "Rule updated successfully" response
135
+
Given operation "UpdateScorecardRule" enabled
136
+
And there is a valid "create_scorecard_rule" in the system
137
+
And new "UpdateScorecardRule" request
138
+
And request contains "rule_id" parameter from "create_scorecard_rule.data.id"
139
+
And body with value {"data": { "attributes" : {"enabled": true, "name": "{{create_scorecard_rule.data.attributes.name}}", "scorecard_name": "{{create_scorecard_rule.data.attributes.scorecard_name}}", "description": "Updated description via test"}}}
140
+
When the request is sent
141
+
Then the response status is 200 Rule updated successfully
0 commit comments