-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathusers.feature
More file actions
102 lines (88 loc) · 4.57 KB
/
users.feature
File metadata and controls
102 lines (88 loc) · 4.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
@endpoint(users) @endpoint(users-v1)
Feature: Users
Create, edit, and disable users.
Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "Users" API
@generated @skip @team:DataDog/org-management
Scenario: Create a user returns "Bad Request" response
Given new "CreateUser" request
And body with value {"access_role": "ro", "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user"}
When the request is sent
Then the response status is 400 Bad Request
@generated @skip @team:DataDog/org-management
Scenario: Create a user returns "Conflict" response
Given new "CreateUser" request
And body with value {"access_role": "ro", "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user"}
When the request is sent
Then the response status is 409 Conflict
@generated @skip @team:DataDog/org-management
Scenario: Create a user returns "User created" response
Given new "CreateUser" request
And body with value {"access_role": "ro", "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user"}
When the request is sent
Then the response status is 200 User created
@replay-only @team:DataDog/org-management
Scenario: Create a user returns null access role
Given new "CreateUser" request
And body with value {"access_role": null, "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user"}
When the request is sent
Then the response status is 200 User created
And the response "user.access_role" is equal to null
@generated @skip @team:DataDog/org-management
Scenario: Disable a user returns "Bad Request" response
Given new "DisableUser" request
And request contains "user_handle" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request
@generated @skip @team:DataDog/org-management
Scenario: Disable a user returns "Not Found" response
Given new "DisableUser" request
And request contains "user_handle" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:DataDog/org-management
Scenario: Disable a user returns "User disabled" response
Given new "DisableUser" request
And request contains "user_handle" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 User disabled
@generated @skip @team:DataDog/org-management
Scenario: Get user details returns "Not Found" response
Given new "GetUser" request
And request contains "user_handle" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:DataDog/org-management
Scenario: Get user details returns "OK for get user" response
Given new "GetUser" request
And request contains "user_handle" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK for get user
@generated @skip @team:DataDog/org-management
Scenario: List all users returns "OK" response
Given new "ListUsers" request
When the request is sent
Then the response status is 200 OK
@generated @skip @team:DataDog/org-management
Scenario: Update a user returns "Bad Request" response
Given new "UpdateUser" request
And request contains "user_handle" parameter from "REPLACE.ME"
And body with value {"access_role": "ro", "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user"}
When the request is sent
Then the response status is 400 Bad Request
@generated @skip @team:DataDog/org-management
Scenario: Update a user returns "Not Found" response
Given new "UpdateUser" request
And request contains "user_handle" parameter from "REPLACE.ME"
And body with value {"access_role": "ro", "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user"}
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:DataDog/org-management
Scenario: Update a user returns "User updated" response
Given new "UpdateUser" request
And request contains "user_handle" parameter from "REPLACE.ME"
And body with value {"access_role": "ro", "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user"}
When the request is sent
Then the response status is 200 User updated