-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathkey_management.feature
More file actions
179 lines (155 loc) · 7.22 KB
/
key_management.feature
File metadata and controls
179 lines (155 loc) · 7.22 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
@endpoint(key-management) @endpoint(key-management-v1)
Feature: Key Management
Manage your Datadog API and application keys. You need an API key and an
application key for a user with the required permissions to interact with
these endpoints. Consult the following pages to view and manage your
keys: - [API Keys](https://app.datadoghq.com/organization-settings/api-
keys) - [Application Keys](https://app.datadoghq.com/personal-
settings/application-keys)
Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "KeyManagement" API
@generated @skip @team:DataDog/credential-management
Scenario: Create an API key returns "Bad Request" response
Given new "CreateAPIKey" request
And body with value {"name": "example user"}
When the request is sent
Then the response status is 400 Bad Request
@generated @skip @team:DataDog/credential-management
Scenario: Create an API key returns "OK" response
Given new "CreateAPIKey" request
And body with value {"name": "example user"}
When the request is sent
Then the response status is 200 OK
@generated @skip @team:DataDog/credential-management
Scenario: Create an application key returns "Bad Request" response
Given new "CreateApplicationKey" request
And body with value {"name": "example user"}
When the request is sent
Then the response status is 400 Bad Request
@generated @skip @team:DataDog/credential-management
Scenario: Create an application key returns "Conflict" response
Given new "CreateApplicationKey" request
And body with value {"name": "example user"}
When the request is sent
Then the response status is 409 Conflict
@generated @skip @team:DataDog/credential-management
Scenario: Create an application key returns "OK" response
Given new "CreateApplicationKey" request
And body with value {"name": "example user"}
When the request is sent
Then the response status is 200 OK
@generated @skip @team:DataDog/credential-management
Scenario: Delete an API key returns "Bad Request" response
Given new "DeleteAPIKey" request
And request contains "key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request
@generated @skip @team:DataDog/credential-management
Scenario: Delete an API key returns "Not Found" response
Given new "DeleteAPIKey" request
And request contains "key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:DataDog/credential-management
Scenario: Delete an API key returns "OK" response
Given new "DeleteAPIKey" request
And request contains "key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK
@generated @skip @team:DataDog/credential-management
Scenario: Delete an application key returns "Not Found" response
Given new "DeleteApplicationKey" request
And request contains "key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:DataDog/credential-management
Scenario: Delete an application key returns "OK" response
Given new "DeleteApplicationKey" request
And request contains "key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK
@generated @skip @team:DataDog/credential-management
Scenario: Edit an API key returns "Bad Request" response
Given new "UpdateAPIKey" request
And request contains "key" parameter from "REPLACE.ME"
And body with value {"name": "example user"}
When the request is sent
Then the response status is 400 Bad Request
@generated @skip @team:DataDog/credential-management
Scenario: Edit an API key returns "Not Found" response
Given new "UpdateAPIKey" request
And request contains "key" parameter from "REPLACE.ME"
And body with value {"name": "example user"}
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:DataDog/credential-management
Scenario: Edit an API key returns "OK" response
Given new "UpdateAPIKey" request
And request contains "key" parameter from "REPLACE.ME"
And body with value {"name": "example user"}
When the request is sent
Then the response status is 200 OK
@generated @skip @team:DataDog/credential-management
Scenario: Edit an application key returns "Bad Request" response
Given new "UpdateApplicationKey" request
And request contains "key" parameter from "REPLACE.ME"
And body with value {"name": "example user"}
When the request is sent
Then the response status is 400 Bad Request
@generated @skip @team:DataDog/credential-management
Scenario: Edit an application key returns "Conflict" response
Given new "UpdateApplicationKey" request
And request contains "key" parameter from "REPLACE.ME"
And body with value {"name": "example user"}
When the request is sent
Then the response status is 409 Conflict
@generated @skip @team:DataDog/credential-management
Scenario: Edit an application key returns "Not Found" response
Given new "UpdateApplicationKey" request
And request contains "key" parameter from "REPLACE.ME"
And body with value {"name": "example user"}
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:DataDog/credential-management
Scenario: Edit an application key returns "OK" response
Given new "UpdateApplicationKey" request
And request contains "key" parameter from "REPLACE.ME"
And body with value {"name": "example user"}
When the request is sent
Then the response status is 200 OK
@generated @skip @team:DataDog/credential-management
Scenario: Get API key returns "Not Found" response
Given new "GetAPIKey" request
And request contains "key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:DataDog/credential-management
Scenario: Get API key returns "OK" response
Given new "GetAPIKey" request
And request contains "key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK
@generated @skip @team:DataDog/credential-management
Scenario: Get all API keys returns "OK" response
Given new "ListAPIKeys" request
When the request is sent
Then the response status is 200 OK
@generated @skip @team:DataDog/credential-management
Scenario: Get all application keys returns "OK" response
Given new "ListApplicationKeys" request
When the request is sent
Then the response status is 200 OK
@generated @skip @team:DataDog/credential-management
Scenario: Get an application key returns "Not Found" response
Given new "GetApplicationKey" request
And request contains "key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:DataDog/credential-management
Scenario: Get an application key returns "OK" response
Given new "GetApplicationKey" request
And request contains "key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK