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/roles.feature
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,9 @@ Feature: Roles
6
6
account assets can be granted to roles in the Datadog application without
7
7
using this API. For example, granting read access on a specific log index
8
8
to a role can be done in Datadog from the [Pipelines
9
-
page](https://app.datadoghq.com/logs/pipelines).
9
+
page](https://app.datadoghq.com/logs/pipelines). Roles can also be
10
+
managed in bulk through the Datadog UI, which provides the capability to
11
+
assign a single permission to multiple roles simultaneously.
10
12
11
13
Background:
12
14
Given a valid "apiKeyAuth" key in the system
@@ -64,7 +66,7 @@ Feature: Roles
64
66
Scenario: Create a new role by cloning an existing role returns "Not found" response
65
67
Given new "CloneRole" request
66
68
And request contains "role_id" parameter from "REPLACE.ME"
67
-
And body with value {"data": {"attributes": {"name": "cloned-role"}, "type": "roles"}}
69
+
And body with value {"data": {"attributes": {"name": "cloned-role", "receives_permissions_from": []}, "type": "roles"}}
68
70
When the request is sent
69
71
Then the response status is 404 Not found
70
72
@@ -81,14 +83,14 @@ Feature: Roles
81
83
@generated@skip@team:DataDog/aaa-core-access
82
84
Scenario: Create role returns "Bad Request" response
83
85
Given new "CreateRole" request
84
-
And body with value {"data": {"attributes": {"name": "developers"}, "relationships": {"permissions": {"data": [{"type": "permissions"}]}}, "type": "roles"}}
86
+
And body with value {"data": {"attributes": {"name": "developers", "receives_permissions_from": []}, "relationships": {"permissions": {"data": [{"type": "permissions"}]}}, "type": "roles"}}
85
87
When the request is sent
86
88
Then the response status is 400 Bad Request
87
89
88
90
@generated@skip@team:DataDog/aaa-core-access
89
91
Scenario: Create role returns "OK" response
90
92
Given new "CreateRole" request
91
-
And body with value {"data": {"attributes": {"name": "developers"}, "relationships": {"permissions": {"data": [{"type": "permissions"}]}}, "type": "roles"}}
93
+
And body with value {"data": {"attributes": {"name": "developers", "receives_permissions_from": []}, "relationships": {"permissions": {"data": [{"type": "permissions"}]}}, "type": "roles"}}
92
94
When the request is sent
93
95
Then the response status is 200 OK
94
96
@@ -335,6 +337,6 @@ Feature: Roles
335
337
Scenario: Update a role returns "Unprocessable Entity" response
336
338
Given new "UpdateRole" request
337
339
And request contains "role_id" parameter from "REPLACE.ME"
338
-
And body with value {"data": {"attributes": {}, "id": "00000000-0000-1111-0000-000000000000", "relationships": {"permissions": {"data": [{"type": "permissions"}]}}, "type": "roles"}}
340
+
And body with value {"data": {"attributes": {"receives_permissions_from": []}, "id": "00000000-0000-1111-0000-000000000000", "relationships": {"permissions": {"data": [{"type": "permissions"}]}}, "type": "roles"}}
339
341
When the request is sent
340
342
Then the response status is 422 Unprocessable Entity
0 commit comments