Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/v2/features/ip_allowlist.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Feature: IP Allowlist
And a valid "appKeyAuth" key in the system
And an instance of "IPAllowlist" API

@generated @skip @team:DataDog/aaa-core-access
@generated @skip @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Get IP Allowlist returns "Not Found" response
Given new "GetIPAllowlist" request
When the request is sent
Then the response status is 404 Not Found

@team:DataDog/aaa-core-access
@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Get IP Allowlist returns "OK" response
Given the "ip_allowlist_nonempty_disabled" has two entries and is disabled
And new "GetIPAllowlist" request
Expand All @@ -32,21 +32,21 @@ Feature: IP Allowlist
And the response "data.attributes.entries[1].data.attributes.note" has the same value as "ip_allowlist_nonempty_disabled.data.attributes.entries[1].data.attributes.note"
And the response "data.attributes.entries[1].data.type" is equal to "{{ ip_allowlist_nonempty_disabled.data.attributes.entries[1].data.type }}"

@team:DataDog/aaa-core-access
@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Update IP Allowlist returns "Bad Request" response
Given new "UpdateIPAllowlist" request
And body with value {"data": {"type": "ip_allowlist", "attributes": {"enabled": true, "entries": []}}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/aaa-core-access
@generated @skip @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Update IP Allowlist returns "Not Found" response
Given new "UpdateIPAllowlist" request
And body with value {"data": {"attributes": {"entries": [{"data": {"attributes": {}, "type": "ip_allowlist_entry"}}]}, "type": "ip_allowlist"}}
When the request is sent
Then the response status is 404 Not Found

@replay-only @skip-terraform-config @team:DataDog/aaa-core-access
@replay-only @skip-terraform-config @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Update IP Allowlist returns "OK" response
Given the "ip_allowlist_empty_disabled" has no entries and is disabled
And new "UpdateIPAllowlist" request
Expand Down
72 changes: 36 additions & 36 deletions tests/v2/features/roles.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ Feature: Roles
And a valid "appKeyAuth" key in the system
And an instance of "Roles" API

@generated @skip @team:DataDog/aaa-core-access
@generated @skip @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Add a user to a role returns "Bad Request" response
Given new "AddUserToRole" request
And request contains "role_id" parameter from "REPLACE.ME"
And body with value {"data": {"id": "00000000-0000-0000-2345-000000000000", "type": "users"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/aaa-core-access
@generated @skip @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Add a user to a role returns "Not found" response
Given new "AddUserToRole" request
And request contains "role_id" parameter from "REPLACE.ME"
And body with value {"data": {"id": "00000000-0000-0000-2345-000000000000", "type": "users"}}
When the request is sent
Then the response status is 404 Not found

@team:DataDog/aaa-core-access
@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Add a user to a role returns "OK" response
Given there is a valid "role" in the system
And there is a valid "user" in the system
Expand All @@ -44,7 +44,7 @@ Feature: Roles
And the response "data[0].type" is equal to "{{ user.data.type }}"
And the response "data[0].relationships.roles.data" has item with field "id" with value "{{ role.data.id }}"

@team:DataDog/aaa-core-access
@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Create a new role by cloning an existing role returns "Bad Request" response
Given there is a valid "role" in the system
And new "CloneRole" request
Expand All @@ -53,7 +53,7 @@ Feature: Roles
When the request is sent
Then the response status is 400 Bad Request

@team:DataDog/aaa-core-access
@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Create a new role by cloning an existing role returns "Conflict" response
Given there is a valid "role" in the system
And new "CloneRole" request
Expand All @@ -62,15 +62,15 @@ Feature: Roles
When the request is sent
Then the response status is 409 Conflict

@generated @skip @team:DataDog/aaa-core-access
@generated @skip @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Create a new role by cloning an existing role returns "Not found" response
Given new "CloneRole" request
And request contains "role_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"name": "cloned-role", "receives_permissions_from": []}, "type": "roles"}}
When the request is sent
Then the response status is 404 Not found

@team:DataDog/aaa-core-access
@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Create a new role by cloning an existing role returns "OK" response
Given there is a valid "role" in the system
And new "CloneRole" request
Expand All @@ -80,21 +80,21 @@ Feature: Roles
Then the response status is 200 OK
And the response "data.attributes.name" is equal to "{{ unique }} clone"

@generated @skip @team:DataDog/aaa-core-access
@generated @skip @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Create role returns "Bad Request" response
Given new "CreateRole" request
And body with value {"data": {"attributes": {"name": "developers", "receives_permissions_from": []}, "relationships": {"permissions": {"data": [{"type": "permissions"}]}}, "type": "roles"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/aaa-core-access
@generated @skip @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Create role returns "OK" response
Given new "CreateRole" request
And body with value {"data": {"attributes": {"name": "developers", "receives_permissions_from": []}, "relationships": {"permissions": {"data": [{"type": "permissions"}]}}, "type": "roles"}}
When the request is sent
Then the response status is 200 OK

@team:DataDog/aaa-core-access
@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Create role with a permission returns "OK" response
Given new "CreateRole" request
And there is a valid "permission" in the system
Expand All @@ -105,29 +105,29 @@ Feature: Roles
And the response "data.type" is equal to "roles"
And the response "data.relationships.permissions.data" has item with field "id" with value "{{ permission.id }}"

@generated @skip @team:DataDog/aaa-core-access
@generated @skip @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Delete role returns "Not found" response
Given new "DeleteRole" request
And request contains "role_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not found

@team:DataDog/aaa-core-access
@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Delete role returns "OK" response
Given there is a valid "role" in the system
And new "DeleteRole" request
And request contains "role_id" parameter from "role.data.id"
When the request is sent
Then the response status is 204 OK

@generated @skip @team:DataDog/aaa-core-access
@generated @skip @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Get a role returns "Not found" response
Given new "GetRole" request
And request contains "role_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not found

@team:DataDog/aaa-core-access
@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Get a role returns "OK" response
Given there is a valid "role" in the system
And new "GetRole" request
Expand All @@ -137,14 +137,14 @@ Feature: Roles
And the response "data.attributes.name" has the same value as "role.data.attributes.name"
And the response "data.id" has the same value as "role.data.id"

@generated @skip @team:DataDog/aaa-core-access
@generated @skip @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Get all users of a role returns "Not found" response
Given new "ListRoleUsers" request
And request contains "role_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not found

@team:DataDog/aaa-core-access
@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Get all users of a role returns "OK" response
Given there is a valid "role" in the system
And there is a valid "user" in the system
Expand All @@ -156,23 +156,23 @@ Feature: Roles
And the response "meta.page.total_count" is equal to 1
And the response "data" has item with field "id" with value "{{ user.data.id }}"

@generated @skip @team:DataDog/aaa-core-access
@generated @skip @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Grant permission to a role returns "Bad Request" response
Given new "AddPermissionToRole" request
And request contains "role_id" parameter from "REPLACE.ME"
And body with value {"data": {"type": "permissions"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/aaa-core-access
@generated @skip @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Grant permission to a role returns "Not found" response
Given new "AddPermissionToRole" request
And request contains "role_id" parameter from "REPLACE.ME"
And body with value {"data": {"type": "permissions"}}
When the request is sent
Then the response status is 404 Not found

@team:DataDog/aaa-core-access
@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Grant permission to a role returns "OK" response
Given there is a valid "role" in the system
And there is a valid "permission" in the system
Expand All @@ -184,14 +184,14 @@ Feature: Roles
And the response "data[0].type" is equal to "{{ permission.type }}"
And the response "data" has item with field "id" with value "{{ permission.id }}"

@generated @skip @team:DataDog/aaa-core-access
@generated @skip @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: List permissions for a role returns "Not found" response
Given new "ListRolePermissions" request
And request contains "role_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not found

@team:DataDog/aaa-core-access
@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: List permissions for a role returns "OK" response
Given there is a valid "role" in the system
And there is a valid "permission" in the system
Expand All @@ -203,13 +203,13 @@ Feature: Roles
And the response "data[0].type" is equal to "{{ permission.type }}"
And the response "data" has item with field "id" with value "{{ permission.id }}"

@generated @skip @team:DataDog/aaa-core-access
@generated @skip @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: List permissions returns "Bad Request" response
Given new "ListPermissions" request
When the request is sent
Then the response status is 400 Bad Request

@team:DataDog/aaa-core-access
@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: List permissions returns "OK" response
Given new "ListPermissions" request
When the request is sent
Expand All @@ -219,14 +219,14 @@ Feature: Roles
And the response "data" has item with field "attributes.name" with value "admin"
And the response "data" has item with field "attributes.name_aliases" with value []

@generated @skip @team:DataDog/aaa-core-access
@generated @skip @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: List role templates returns "OK" response
Given operation "ListRoleTemplates" enabled
And new "ListRoleTemplates" request
When the request is sent
Then the response status is 200 OK

@team:DataDog/aaa-core-access
@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: List roles returns "OK" response
Given there is a valid "role" in the system
And new "ListRoles" request
Expand All @@ -237,23 +237,23 @@ Feature: Roles
And the response "data[0].id" has the same value as "role.data.id"
And the response "data[0].attributes.name" has the same value as "role.data.attributes.name"

@generated @skip @team:DataDog/aaa-core-access
@generated @skip @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Remove a user from a role returns "Bad Request" response
Given new "RemoveUserFromRole" request
And request contains "role_id" parameter from "REPLACE.ME"
And body with value {"data": {"id": "00000000-0000-0000-2345-000000000000", "type": "users"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/aaa-core-access
@generated @skip @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Remove a user from a role returns "Not found" response
Given new "RemoveUserFromRole" request
And request contains "role_id" parameter from "REPLACE.ME"
And body with value {"data": {"id": "00000000-0000-0000-2345-000000000000", "type": "users"}}
When the request is sent
Then the response status is 404 Not found

@team:DataDog/aaa-core-access
@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Remove a user from a role returns "OK" response
Given there is a valid "role" in the system
And there is a valid "user" in the system
Expand All @@ -264,7 +264,7 @@ Feature: Roles
When the request is sent
Then the response status is 200 OK

@skip-validation @team:DataDog/aaa-core-access
@skip-validation @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Revoke permission returns "Bad Request" response
Given there is a valid "role" in the system
And new "RemovePermissionFromRole" request
Expand All @@ -273,7 +273,7 @@ Feature: Roles
When the request is sent
Then the response status is 400 Bad Request

@team:DataDog/aaa-core-access
@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Revoke permission returns "Not found" response
Given there is a valid "permission" in the system
And new "RemovePermissionFromRole" request
Expand All @@ -282,7 +282,7 @@ Feature: Roles
When the request is sent
Then the response status is 404 Not found

@team:DataDog/aaa-core-access
@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Revoke permission returns "OK" response
Given there is a valid "role" in the system
And there is a valid "permission" in the system
Expand All @@ -294,7 +294,7 @@ Feature: Roles
Then the response status is 200 OK
And the response "data[0].type" is equal to "permissions"

@team:DataDog/aaa-core-access
@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Update a role returns "Bad Request" response
Given there is a valid "role" in the system
And there is a valid "permission" in the system
Expand All @@ -304,7 +304,7 @@ Feature: Roles
When the request is sent
Then the response status is 400 Bad Request

@team:DataDog/aaa-core-access
@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Update a role returns "Bad Role ID" response
Given there is a valid "role" in the system
And there is a valid "permission" in the system
Expand All @@ -314,7 +314,7 @@ Feature: Roles
When the request is sent
Then the response status is 422 Bad Role ID in Request

@team:DataDog/aaa-core-access
@team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Update a role returns "Not found" response
Given there is a valid "permission" in the system
And new "UpdateRole" request
Expand All @@ -323,7 +323,7 @@ Feature: Roles
When the request is sent
Then the response status is 404 Not found

@skip @team:DataDog/aaa-core-access
@skip @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Update a role returns "OK" response
Given there is a valid "role" in the system
And there is a valid "permission" in the system
Expand All @@ -334,7 +334,7 @@ Feature: Roles
Then the response status is 200 OK
And the response "data.attributes.name" is equal to "{{ role.data.attributes.name }}-updated"

@generated @skip @team:DataDog/aaa-core-access
@generated @skip @team:DataDog/aaa-core-access @team:DataDog/access-policies-lifecycle
Scenario: Update a role returns "Unprocessable Entity" response
Given new "UpdateRole" request
And request contains "role_id" parameter from "REPLACE.ME"
Expand Down
Loading