@@ -7,9 +7,9 @@ Feature: List event logs
7
7
| 9b96c003 -85fa -40e8 -a9ed -580491cd5d79 | Standard 1 |
8
8
| 44c7918c -80ab -4a13 -a831 -a2c46cda85c6 | Ent 1 |
9
9
Given the following "account" rows exist:
10
- | name | slug | plan_id |
11
- | Standard | standard | 9b96c003 -85fa -40e8 -a9ed -580491cd5d79 |
12
- | Ent | ent | 44c7918c -80ab -4a13 -a831 -a2c46cda85c6 |
10
+ | id | name | slug | plan_id |
11
+ | 99b7580f - d2fc - 4b8f - 8279 - ec95fb523a17 | Standard | standard | 9b96c003 -85fa -40e8 -a9ed -580491cd5d79 |
12
+ | c6c845b1 - e9fa - 4126 - b89d - bdf32aa6d047 | Ent | ent | 44c7918c -80ab -4a13 -a831 -a2c46cda85c6 |
13
13
And I send and accept JSON
14
14
15
15
Scenario : Endpoint should be inaccessible when account is not on Ent tier
@@ -33,11 +33,31 @@ Feature: List event logs
33
33
Scenario : Admin retrieves all logs for their account
34
34
Given I am an admin of account "ent"
35
35
And the current account is "ent"
36
- And the current account has 3 "event-logs"
36
+ And the following "event-type" rows exist:
37
+ | id | event |
38
+ | 1d721621 -cbb5 -4f4d -ae73 -41d77a26276a | test .account .updated |
39
+ | c257ce16 -4f38 -490e -8e4e -1be9ba1e8830 | test .license .created |
40
+ | 8c312434 -f8e9 -402f -8169 -49fc1409198e | test .license .updated |
41
+ | 1e7c4ec0 -127f -4691 -b400 -427333362176 | test .license .validation .succeeded |
42
+ | 204590ba -b02e -4efd -ac32 -5d1588932efa | test .license .validation .failed |
43
+ And the current account has the following "license" rows:
44
+ | id |
45
+ | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 |
46
+ And the current account has the following "event-log" rows:
47
+ | whodunnit_type | whodunnit_id | event_type_id | resource_type | resource_id |
48
+ | User | 97e58005 -11ab -4186 -aa78 -c21550f6d0ce | c257ce16 -4f38 -490e -8e4e -1be9ba1e8830 | License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 |
49
+ | License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 | 1e7c4ec0 -127f -4691 -b400 -427333362176 | License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 |
50
+ | Product | e37fa95d -7771 -4e30 -84be -acabdedc81ce | 8c312434 -f8e9 -402f -8169 -49fc1409198e | License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 |
51
+ | License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 | 1e7c4ec0 -127f -4691 -b400 -427333362176 | License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 |
52
+ | License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 | 1e7c4ec0 -127f -4691 -b400 -427333362176 | License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 |
53
+ | | | 204590ba -b02e -4efd -ac32 -5d1588932efa | License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 |
54
+ | User | 54a44eaf -6a83 -4bb4 -b3c1 -17600dfdd77c | 8c312434 -f8e9 -402f -8169 -49fc1409198e | License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 |
55
+ | User | 54a44eaf -6a83 -4bb4 -b3c1 -17600dfdd77c | 8c312434 -f8e9 -402f -8169 -49fc1409198e | Machine | 19ac6439 -5576 -4ba8 -92cd -f4c17573159e |
56
+ | User | 54a44eaf -6a83 -4bb4 -b3c1 -17600dfdd77c | 1d721621 -cbb5 -4f4d -ae73 -41d77a26276a | Account | c6c845b1 -e9fa -4126 -b89d -bdf32aa6d047 |
37
57
And I use an authentication token
38
58
When I send a GET request to "/accounts/ent/event-logs"
39
59
Then the response status should be "200"
40
- And the response body should be an array with 3 "event-logs"
60
+ And the response body should be an array with 9 "event-logs"
41
61
42
62
Scenario : Admin retrieves a list of logs that is automatically limited
43
63
Given I am an admin of account "ent"
@@ -121,6 +141,7 @@ Feature: List event logs
121
141
And the current account is "ent"
122
142
And the following "event-type" rows exist:
123
143
| id | event |
144
+ | 1d721621 -cbb5 -4f4d -ae73 -41d77a26276a | test .account .updated |
124
145
| c257ce16 -4f38 -490e -8e4e -1be9ba1e8830 | test .license .created |
125
146
| 8c312434 -f8e9 -402f -8169 -49fc1409198e | test .license .updated |
126
147
| 1e7c4ec0 -127f -4691 -b400 -427333362176 | test .license .validation .succeeded |
@@ -137,6 +158,8 @@ Feature: List event logs
137
158
| License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 | 1e7c4ec0 -127f -4691 -b400 -427333362176 | License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 |
138
159
| | | 204590ba -b02e -4efd -ac32 -5d1588932efa | License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 |
139
160
| User | 54a44eaf -6a83 -4bb4 -b3c1 -17600dfdd77c | 8c312434 -f8e9 -402f -8169 -49fc1409198e | License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 |
161
+ | User | 54a44eaf -6a83 -4bb4 -b3c1 -17600dfdd77c | 8c312434 -f8e9 -402f -8169 -49fc1409198e | Machine | 19ac6439 -5576 -4ba8 -92cd -f4c17573159e |
162
+ | User | 54a44eaf -6a83 -4bb4 -b3c1 -17600dfdd77c | 1d721621 -cbb5 -4f4d -ae73 -41d77a26276a | Account | c6c845b1 -e9fa -4126 -b89d -bdf32aa6d047 |
140
163
And I use an authentication token
141
164
When I send a GET request to "/accounts/ent/event-logs?whodunnit[type]=license&whodunnit[id]=19c0e512-d08a-408d-8d1a-6400baaf5a40"
142
165
Then the response status should be "200"
@@ -147,6 +170,7 @@ Feature: List event logs
147
170
And the current account is "ent"
148
171
And the following "event-type" rows exist:
149
172
| id | event |
173
+ | 1d721621 -cbb5 -4f4d -ae73 -41d77a26276a | test .account .updated |
150
174
| c257ce16 -4f38 -490e -8e4e -1be9ba1e8830 | test .license .created |
151
175
| 8c312434 -f8e9 -402f -8169 -49fc1409198e | test .license .updated |
152
176
| 1e7c4ec0 -127f -4691 -b400 -427333362176 | test .license .validation .succeeded |
@@ -164,6 +188,7 @@ Feature: List event logs
164
188
| License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 | 1e7c4ec0 -127f -4691 -b400 -427333362176 | License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 |
165
189
| | | 204590ba -b02e -4efd -ac32 -5d1588932efa | License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 |
166
190
| User | 54a44eaf -6a83 -4bb4 -b3c1 -17600dfdd77c | 8c312434 -f8e9 -402f -8169 -49fc1409198e | Machine | 19ac6439 -5576 -4ba8 -92cd -f4c17573159e |
191
+ | User | 54a44eaf -6a83 -4bb4 -b3c1 -17600dfdd77c | 1d721621 -cbb5 -4f4d -ae73 -41d77a26276a | Account | c6c845b1 -e9fa -4126 -b89d -bdf32aa6d047 |
167
192
And I use an authentication token
168
193
When I send a GET request to "/accounts/ent/event-logs?resource[type]=license&resource[id]=19c0e512-d08a-408d-8d1a-6400baaf5a40"
169
194
Then the response status should be "200"
@@ -174,6 +199,7 @@ Feature: List event logs
174
199
And the current account is "ent"
175
200
And the following "event-type" rows exist:
176
201
| id | event |
202
+ | 1d721621 -cbb5 -4f4d -ae73 -41d77a26276a | test .account .updated |
177
203
| c257ce16 -4f38 -490e -8e4e -1be9ba1e8830 | test .license .created |
178
204
| 8c312434 -f8e9 -402f -8169 -49fc1409198e | test .license .updated |
179
205
| 1e7c4ec0 -127f -4691 -b400 -427333362176 | test .license .validation .succeeded |
@@ -192,6 +218,7 @@ Feature: List event logs
192
218
| | | 204590ba -b02e -4efd -ac32 -5d1588932efa | License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 |
193
219
| | | 204590ba -b02e -4efd -ac32 -5d1588932efa | License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 |
194
220
| User | 54a44eaf -6a83 -4bb4 -b3c1 -17600dfdd77c | 8c312434 -f8e9 -402f -8169 -49fc1409198e | Machine | 19ac6439 -5576 -4ba8 -92cd -f4c17573159e |
221
+ | User | 54a44eaf -6a83 -4bb4 -b3c1 -17600dfdd77c | 1d721621 -cbb5 -4f4d -ae73 -41d77a26276a | Account | c6c845b1 -e9fa -4126 -b89d -bdf32aa6d047 |
195
222
And I use an authentication token
196
223
When I send a GET request to "/accounts/ent/event-logs?event=test.license.validation.failed"
197
224
Then the response status should be "200"
@@ -202,6 +229,7 @@ Feature: List event logs
202
229
And the current account is "ent"
203
230
And the following "event-type" rows exist:
204
231
| id | event |
232
+ | 1d721621 -cbb5 -4f4d -ae73 -41d77a26276a | test .account .updated |
205
233
| c257ce16 -4f38 -490e -8e4e -1be9ba1e8830 | test .license .created |
206
234
| 8c312434 -f8e9 -402f -8169 -49fc1409198e | test .license .updated |
207
235
| 1e7c4ec0 -127f -4691 -b400 -427333362176 | test .license .validation .succeeded |
@@ -223,6 +251,7 @@ Feature: List event logs
223
251
| | | 204590ba -b02e -4efd -ac32 -5d1588932efa | License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 | |
224
252
| | | 204590ba -b02e -4efd -ac32 -5d1588932efa | License | 19c0e512 -d08a -408d -8d1a -6400baaf5a40 | |
225
253
| User | 54a44eaf -6a83 -4bb4 -b3c1 -17600dfdd77c | 8c312434 -f8e9 -402f -8169 -49fc1409198e | Machine | 19ac6439 -5576 -4ba8 -92cd -f4c17573159e | |
254
+ | User | 54a44eaf -6a83 -4bb4 -b3c1 -17600dfdd77c | 1d721621 -cbb5 -4f4d -ae73 -41d77a26276a | Account | c6c845b1 -e9fa -4126 -b89d -bdf32aa6d047 | |
226
255
And I use an authentication token
227
256
When I send a GET request to "/accounts/ent/event-logs?request=97708dc6-9dd2-4de1-84be-24f50287296c"
228
257
Then the response status should be "200"
0 commit comments