sefrone-api-e2e 1.1.3__tar.gz → 1.1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. {sefrone_api_e2e-1.1.3 → sefrone_api_e2e-1.1.4}/PKG-INFO +13 -5
  2. {sefrone_api_e2e-1.1.3 → sefrone_api_e2e-1.1.4}/sefrone_api_e2e/__init__.py +2 -0
  3. sefrone_api_e2e-1.1.4/sefrone_api_e2e/e2e/Scenarios/Auth/0_check_features.yaml +19 -0
  4. sefrone_api_e2e-1.1.4/sefrone_api_e2e/e2e/Scenarios/Auth/1_normal_auth_flow.yaml +377 -0
  5. sefrone_api_e2e-1.1.4/sefrone_api_e2e/e2e/Scenarios/Auth/2_account_endpoints.yaml +172 -0
  6. sefrone_api_e2e-1.1.4/sefrone_api_e2e/e2e/Scenarios/Auth/3_admin_account_endpoints.yaml +310 -0
  7. sefrone_api_e2e-1.1.4/sefrone_api_e2e/e2e/Scenarios/Auth/4_workspace_endpoints.yaml +291 -0
  8. sefrone_api_e2e-1.1.4/sefrone_api_e2e/e2e/Scenarios/Auth/5_apikey_endpoints.yaml +368 -0
  9. sefrone_api_e2e-1.1.4/sefrone_api_e2e/e2e/Scenarios/Auth/6_project_endpoints.yaml +286 -0
  10. sefrone_api_e2e-1.1.4/sefrone_api_e2e/e2e/Scenarios/Auth/7_email_2fa_flow.yaml +80 -0
  11. {sefrone_api_e2e-1.1.3 → sefrone_api_e2e-1.1.4}/sefrone_api_e2e/runner_email_mock.py +0 -2
  12. {sefrone_api_e2e-1.1.3 → sefrone_api_e2e-1.1.4}/sefrone_api_e2e/runner_rest_api.py +2 -1
  13. sefrone_api_e2e-1.1.4/sefrone_api_e2e/runner_webhook_mock.py +546 -0
  14. {sefrone_api_e2e-1.1.3 → sefrone_api_e2e-1.1.4}/sefrone_api_e2e.egg-info/PKG-INFO +14 -6
  15. sefrone_api_e2e-1.1.4/sefrone_api_e2e.egg-info/SOURCES.txt +23 -0
  16. {sefrone_api_e2e-1.1.3 → sefrone_api_e2e-1.1.4}/setup.py +1 -1
  17. sefrone_api_e2e-1.1.3/sefrone_api_e2e.egg-info/SOURCES.txt +0 -14
  18. {sefrone_api_e2e-1.1.3 → sefrone_api_e2e-1.1.4}/README.md +0 -0
  19. {sefrone_api_e2e-1.1.3 → sefrone_api_e2e-1.1.4}/sefrone_api_e2e/api_e2e_manager.py +0 -0
  20. {sefrone_api_e2e-1.1.3 → sefrone_api_e2e-1.1.4}/sefrone_api_e2e/e2e_scenarios_manager.py +0 -0
  21. {sefrone_api_e2e-1.1.3 → sefrone_api_e2e-1.1.4}/sefrone_api_e2e/json_mock_server.py +0 -0
  22. {sefrone_api_e2e-1.1.3 → sefrone_api_e2e-1.1.4}/sefrone_api_e2e/step_runner.py +0 -0
  23. {sefrone_api_e2e-1.1.3 → sefrone_api_e2e-1.1.4}/sefrone_api_e2e.egg-info/dependency_links.txt +0 -0
  24. {sefrone_api_e2e-1.1.3 → sefrone_api_e2e-1.1.4}/sefrone_api_e2e.egg-info/requires.txt +0 -0
  25. {sefrone_api_e2e-1.1.3 → sefrone_api_e2e-1.1.4}/sefrone_api_e2e.egg-info/top_level.txt +0 -0
  26. {sefrone_api_e2e-1.1.3 → sefrone_api_e2e-1.1.4}/setup.cfg +0 -0
@@ -1,19 +1,27 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: sefrone_api_e2e
3
- Version: 1.1.3
3
+ Version: 1.1.4
4
4
  Summary: A Python package to provide e2e testing helpers for sefrone API projects
5
5
  Home-page: https://bitbucket.org/sefrone/sefrone_pypi
6
6
  Author: Sefrone
7
7
  Author-email: contact@sefrone.com
8
- License: UNKNOWN
9
- Platform: UNKNOWN
10
8
  Classifier: Programming Language :: Python :: 3
11
9
  Classifier: License :: Other/Proprietary License
12
10
  Classifier: Operating System :: OS Independent
13
11
  Requires-Python: >=3.7
14
12
  Description-Content-Type: text/markdown
13
+ Requires-Dist: PyYAML>=6.0.1
14
+ Requires-Dist: requests
15
+ Dynamic: author
16
+ Dynamic: author-email
17
+ Dynamic: classifier
18
+ Dynamic: description
19
+ Dynamic: description-content-type
20
+ Dynamic: home-page
21
+ Dynamic: requires-dist
22
+ Dynamic: requires-python
23
+ Dynamic: summary
15
24
 
16
25
  This is not a usable Python package, but the name is reserved by SARL Sefrone.
17
26
 
18
27
  You can find other packages published by Sefrone at pypi.org/user/gnasreddine
19
-
@@ -2,6 +2,7 @@ from .api_e2e_manager import ApiE2ETestsManager, ScenarioSkippedException
2
2
  from .step_runner import StepRunner, RunContext, StepResult
3
3
  from .runner_rest_api import RestApiRunner
4
4
  from .runner_email_mock import EmailMockRunner
5
+ from .runner_webhook_mock import WebhookMockRunner
5
6
  from .json_mock_server import JsonMockServer
6
7
  from .e2e_scenarios_manager import E2EScenariosManager
7
8
 
@@ -13,6 +14,7 @@ __all__ = [
13
14
  "StepResult",
14
15
  "RestApiRunner",
15
16
  "EmailMockRunner",
17
+ "WebhookMockRunner",
16
18
  "JsonMockServer",
17
19
  "E2EScenariosManager",
18
20
  ]
@@ -0,0 +1,19 @@
1
+ name: "Check Auth Features"
2
+ base_url: "http://localhost:$var(API_PUBLIC_PORT)"
3
+ steps:
4
+ - name: "Get enabled auth features"
5
+ retry:
6
+ attempts: 10
7
+ delay_seconds: 5
8
+ method: "GET"
9
+ endpoint: "/api/v1/apiAuth/features"
10
+ expect:
11
+ status: 200
12
+ body:
13
+ errorCode: number
14
+ errorCodeStr: string
15
+ message: string
16
+ response:
17
+ features: []
18
+ save:
19
+ enabled_features: "{{body.response.features}}"
@@ -0,0 +1,377 @@
1
+ name: "Auth Flow"
2
+ base_url: "http://localhost:$var(API_PUBLIC_PORT)"
3
+ steps:
4
+ - name: "Login user"
5
+ retry:
6
+ attempts: 10
7
+ delay_seconds: 5
8
+ method: "POST"
9
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
10
+ send_as: "json"
11
+ body:
12
+ device: "e2e_test_device"
13
+ pseudo: "$var(DEFAULT_USERNAME)"
14
+ password: "$var(DEFAULT_PASSWORD)"
15
+ expect:
16
+ status: 200
17
+ body:
18
+ response:
19
+ token: string
20
+ save:
21
+ login_token: "{{body.response.token}}"
22
+
23
+ - name: "Generate unique test suffix"
24
+ randomize:
25
+ seed_id: 8
26
+
27
+ - name: "Get user info"
28
+ method: "GET"
29
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/info/{$stored.login_token}"
30
+ expect:
31
+ status: 200
32
+ body:
33
+ errorCode: number
34
+ errorCodeStr: string
35
+ message: string
36
+ response:
37
+ accountId: string
38
+ projectId: string
39
+ project: string
40
+ accountType: string
41
+ credentialType: string
42
+ isActive: boolean
43
+ username: string
44
+ linkedWorkspaces:
45
+ - workspaceId: string
46
+ workspaceName: string
47
+ workspaceDescription: string
48
+ permissions:
49
+ Projects: string
50
+ Workspaces: string
51
+ ListWorkspaces: string
52
+ Accounts: string
53
+ ApiKeys: string
54
+ AuthStats: string
55
+ AccountState: string
56
+ ChangeAccountPermissions: string
57
+ ChangeAccountCredentials: string
58
+ token: string
59
+ tokenExpiryDate: datetime
60
+ save:
61
+ login_account_id: "{{body.response.accountId}}"
62
+ assertions:
63
+ - "{{body.response.username}} == 'admin'"
64
+ - "{{body.response.isActive}} == True"
65
+ - "{{body.response.accountType}} == 'root'"
66
+ - "{{body.response.credentialType}} == 'standard'"
67
+
68
+ - name: "Get user permissions"
69
+ method: "GET"
70
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/permission/{$stored.login_account_id}"
71
+ request_headers:
72
+ - x-api-token: "{$stored.login_token}"
73
+ expect:
74
+ status: 200
75
+ body:
76
+ errorCode: number
77
+ errorCodeStr: string
78
+ message: string
79
+ response:
80
+ accountId: string
81
+ projectId: string
82
+ permissions:
83
+ Projects: string
84
+ Workspaces: string
85
+ ListWorkspaces: string
86
+ Accounts: string
87
+ ApiKeys: string
88
+ AuthStats: string
89
+ AccountState: string
90
+ ChangeAccountPermissions: string
91
+ ChangeAccountCredentials: string
92
+
93
+ - name: "Get user info using deprecated login check endpoint"
94
+ method: "POST"
95
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login/check/{$stored.login_token}"
96
+ expect:
97
+ status: 200
98
+ body:
99
+ errorCode: number
100
+ errorCodeStr: string
101
+ message: string
102
+ response:
103
+ accountId: string
104
+ projectId: string
105
+ project: string
106
+ accountType: string
107
+ credentialType: string
108
+ isActive: boolean
109
+ username: string
110
+ linkedWorkspaces:
111
+ - workspaceId: string
112
+ workspaceName: string
113
+ workspaceDescription: string
114
+ permissions:
115
+ Projects: string
116
+ Workspaces: string
117
+ ListWorkspaces: string
118
+ Accounts: string
119
+ ApiKeys: string
120
+ AuthStats: string
121
+ AccountState: string
122
+ ChangeAccountPermissions: string
123
+ ChangeAccountCredentials: string
124
+ token: string
125
+ tokenExpiryDate: datetime
126
+ assertions:
127
+ - "{{body.response.accountId}} == '{$stored.login_account_id}'"
128
+ - "{{body.response.username}} == 'admin'"
129
+ - "{{body.response.accountType}} == 'root'"
130
+
131
+ - name: "Create guest account"
132
+ skip_if:
133
+ - "GuestAccount not in {$stored.0_check_features.enabled_features}"
134
+ method: "GET"
135
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/guest"
136
+ expect:
137
+ status: 200
138
+ body:
139
+ errorCode: number
140
+ errorCodeStr: string
141
+ message: string
142
+ response:
143
+ accountId: string
144
+ projectId: string
145
+ project: string
146
+ accountType: string
147
+ credentialType: string
148
+ isActive: boolean
149
+ username: string
150
+ linkedWorkspaces: []
151
+ token: string
152
+ tokenExpiryDate: datetime
153
+ save:
154
+ guest_token: "{{body.response.token}}"
155
+ guest_account_id: "{{body.response.accountId}}"
156
+ assertions:
157
+ - "{{body.response.accountType}} == 'guest'"
158
+ - "{{body.response.credentialType}} == 'guest'"
159
+ - "{{body.response.isActive}} == True"
160
+ - "{{body.response.username}} include 'Guest_'"
161
+ - "{{body.response.linkedWorkspaces.count()}} == 0"
162
+
163
+ - name: "Get same guest account with existing token"
164
+ skip_if:
165
+ - "GuestAccount not in {$stored.0_check_features.enabled_features}"
166
+ method: "GET"
167
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/guest"
168
+ request_headers:
169
+ - x-api-token: "{$stored.guest_token}"
170
+ expect:
171
+ status: 200
172
+ body:
173
+ errorCode: number
174
+ errorCodeStr: string
175
+ message: string
176
+ response:
177
+ accountId: string
178
+ projectId: string
179
+ project: string
180
+ accountType: string
181
+ credentialType: string
182
+ isActive: boolean
183
+ username: string
184
+ linkedWorkspaces: []
185
+ token: string
186
+ tokenExpiryDate: datetime
187
+ assertions:
188
+ - "{{body.response.accountId}} == '{$stored.guest_account_id}'"
189
+ - "{{body.response.token}} == '{$stored.guest_token}'"
190
+ - "{{body.response.accountType}} == 'guest'"
191
+ - "{{body.response.linkedWorkspaces.count()}} == 0"
192
+
193
+ - name: "Create guest account for workspace"
194
+ skip_if:
195
+ - "GuestAccount not in {$stored.0_check_features.enabled_features}"
196
+ - "'$var(DEFAULT_WORKSPACE_NAME)' == ''"
197
+ method: "POST"
198
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/$var(DEFAULT_WORKSPACE_NAME)/guest"
199
+ expect:
200
+ status: 200
201
+ body:
202
+ errorCode: number
203
+ errorCodeStr: string
204
+ message: string
205
+ response:
206
+ accountId: string
207
+ projectId: string
208
+ project: string
209
+ accountType: string
210
+ credentialType: string
211
+ isActive: boolean
212
+ username: string
213
+ linkedWorkspaces:
214
+ - workspaceId: string
215
+ workspaceName: string
216
+ workspaceDescription: string
217
+ token: string
218
+ tokenExpiryDate: datetime
219
+ save:
220
+ workspace_guest_token: "{{body.response.token}}"
221
+ workspace_guest_account_id: "{{body.response.accountId}}"
222
+ assertions:
223
+ - "{{body.response.accountType}} == 'guest'"
224
+ - "{{body.response.credentialType}} == 'guest'"
225
+ - "{{body.response.linkedWorkspaces.count()}} == 1"
226
+ - "{{body.response.linkedWorkspaces[0].workspaceName}} == '$var(DEFAULT_WORKSPACE_NAME)'"
227
+
228
+ - name: "Get same workspace guest account with existing token"
229
+ skip_if:
230
+ - "GuestAccount not in {$stored.0_check_features.enabled_features}"
231
+ - "'$var(DEFAULT_WORKSPACE_NAME)' == ''"
232
+ method: "POST"
233
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/$var(DEFAULT_WORKSPACE_NAME)/guest"
234
+ request_headers:
235
+ - x-api-token: "{$stored.workspace_guest_token}"
236
+ expect:
237
+ status: 200
238
+ body:
239
+ errorCode: number
240
+ errorCodeStr: string
241
+ message: string
242
+ response:
243
+ accountId: string
244
+ projectId: string
245
+ project: string
246
+ accountType: string
247
+ credentialType: string
248
+ isActive: boolean
249
+ username: string
250
+ linkedWorkspaces:
251
+ - workspaceId: string
252
+ workspaceName: string
253
+ workspaceDescription: string
254
+ token: string
255
+ tokenExpiryDate: datetime
256
+ assertions:
257
+ - "{{body.response.accountId}} == '{$stored.workspace_guest_account_id}'"
258
+ - "{{body.response.token}} == '{$stored.workspace_guest_token}'"
259
+ - "{{body.response.linkedWorkspaces.count()}} == 1"
260
+ - "{{body.response.linkedWorkspaces[0].workspaceName}} == '$var(DEFAULT_WORKSPACE_NAME)'"
261
+
262
+ - name: "Register standard account"
263
+ skip_if:
264
+ - "PseudoRegister not in {$stored.0_check_features.enabled_features}"
265
+ method: "POST"
266
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)"
267
+ send_as: "json"
268
+ body:
269
+ username: "e2e_new_user_{$stored.seed_id}"
270
+ password: "e2e_test_password"
271
+ expect:
272
+ status: 200
273
+ body:
274
+ errorCode: number
275
+ errorCodeStr: string
276
+ message: string
277
+ response:
278
+ accountId: string
279
+ projectId: string
280
+ project: string
281
+ accountType: string
282
+ credentialType: string
283
+ isActive: boolean
284
+ username: string
285
+ linkedWorkspaces: []
286
+ save:
287
+ registered_account_id: "{{body.response.accountId}}"
288
+ registered_username: "{{body.response.username}}"
289
+ assertions:
290
+ - "{{body.response.accountType}} == 'standard'"
291
+ - "{{body.response.credentialType}} == 'standard'"
292
+ - "{{body.response.isActive}} == True"
293
+ - "{{body.response.linkedWorkspaces.count()}} == 0"
294
+ - "{{body.response.username}} include 'e2e_new_user_'"
295
+
296
+ - name: "Login with wrong password"
297
+ method: "POST"
298
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
299
+ send_as: "json"
300
+ body:
301
+ device: "e2e_test_device"
302
+ pseudo: "$var(DEFAULT_USERNAME)"
303
+ password: "wrong_password"
304
+ expect:
305
+ status: 401
306
+ body:
307
+ errorCode: number
308
+ errorCodeStr: string
309
+ message: string
310
+
311
+ - name: "Logout current token"
312
+ method: "POST"
313
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/logout/{$stored.login_token}"
314
+ expect:
315
+ status: 200
316
+ body:
317
+ errorCode: number
318
+ errorCodeStr: string
319
+ message: string
320
+
321
+ - name: "Logout guest token"
322
+ skip_if:
323
+ - "GuestAccount not in {$stored.0_check_features.enabled_features}"
324
+ method: "POST"
325
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/logout/{$stored.guest_token}"
326
+ expect:
327
+ status: 200
328
+ body:
329
+ errorCode: number
330
+ errorCodeStr: string
331
+ message: string
332
+
333
+ - name: "Try getting guest info with revoked token"
334
+ skip_if:
335
+ - "GuestAccount not in {$stored.0_check_features.enabled_features}"
336
+ method: "GET"
337
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/info/{$stored.guest_token}"
338
+ expect:
339
+ status: 401
340
+ body:
341
+ errorCode: number
342
+ errorCodeStr: string
343
+ message: string
344
+
345
+ - name: "Logout workspace guest token"
346
+ skip_if:
347
+ - "GuestAccount not in {$stored.0_check_features.enabled_features}"
348
+ method: "POST"
349
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/logout/{$stored.workspace_guest_token}"
350
+ expect:
351
+ status: 200
352
+ body:
353
+ errorCode: number
354
+ errorCodeStr: string
355
+ message: string
356
+
357
+ - name: "Try getting workspace guest info with revoked token"
358
+ skip_if:
359
+ - "GuestAccount not in {$stored.0_check_features.enabled_features}"
360
+ method: "GET"
361
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/info/{$stored.workspace_guest_token}"
362
+ expect:
363
+ status: 401
364
+ body:
365
+ errorCode: number
366
+ errorCodeStr: string
367
+ message: string
368
+
369
+ - name: "Try getting auth info with revoked token"
370
+ method: "GET"
371
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/info/{$stored.login_token}"
372
+ expect:
373
+ status: 401
374
+ body:
375
+ errorCode: number
376
+ errorCodeStr: string
377
+ message: string
@@ -0,0 +1,172 @@
1
+ name: "Account Endpoints Flow"
2
+ base_url: "http://localhost:$var(API_PUBLIC_PORT)"
3
+ steps:
4
+ - name: "Login admin user"
5
+ retry:
6
+ attempts: 10
7
+ delay_seconds: 5
8
+ method: "POST"
9
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
10
+ send_as: "json"
11
+ body:
12
+ device: "e2e_test_device"
13
+ pseudo: "$var(DEFAULT_USERNAME)"
14
+ password: "$var(DEFAULT_PASSWORD)"
15
+ expect:
16
+ status: 200
17
+ body:
18
+ response:
19
+ token: string
20
+ save:
21
+ admin_token: "{{body.response.token}}"
22
+
23
+ - name: "Generate unique test suffix"
24
+ randomize:
25
+ guest_seed_account_id: 8
26
+
27
+ - name: "Create account by workspace"
28
+ skip_if:
29
+ - "'$var(DEFAULT_WORKSPACE_NAME)' == ''"
30
+ method: "POST"
31
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/$var(DEFAULT_WORKSPACE_NAME)/create"
32
+ request_headers:
33
+ - x-api-token: "{$stored.admin_token}"
34
+ send_as: "json"
35
+ body:
36
+ username: "e2e_account_{$stored.guest_seed_account_id}"
37
+ password: "e2e_account_pwd_v1"
38
+ expect:
39
+ status: 200
40
+ body:
41
+ errorCode: number
42
+ errorCodeStr: string
43
+ message: string
44
+ response:
45
+ accountId: string
46
+ projectId: string
47
+ project: string
48
+ accountType: string
49
+ credentialType: string
50
+ isActive: boolean
51
+ username: string
52
+ linkedWorkspaces:
53
+ - workspaceId: string
54
+ workspaceName: string
55
+ workspaceDescription: string
56
+ save:
57
+ managed_account_id: "{{body.response.accountId}}"
58
+ managed_account_username: "{{body.response.username}}"
59
+ assertions:
60
+ - "{{body.response.accountType}} == 'standard'"
61
+ - "{{body.response.credentialType}} == 'standard'"
62
+ - "{{body.response.isActive}} == True"
63
+ - "{{body.response.linkedWorkspaces.count()}} == 1"
64
+ - "{{body.response.linkedWorkspaces[0].workspaceName}} == '$var(DEFAULT_WORKSPACE_NAME)'"
65
+
66
+ - name: "Get created account permissions"
67
+ skip_if:
68
+ - "'$var(DEFAULT_WORKSPACE_NAME)' == ''"
69
+ method: "GET"
70
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/permission/{$stored.managed_account_id}"
71
+ request_headers:
72
+ - x-api-token: "{$stored.admin_token}"
73
+ expect:
74
+ status: 200
75
+ body:
76
+ errorCode: number
77
+ errorCodeStr: string
78
+ message: string
79
+ response:
80
+ accountId: string
81
+ projectId: string
82
+ assertions:
83
+ - "{{body.response.accountId}} == '{$stored.managed_account_id}'"
84
+
85
+ - name: "Update created account by workspace"
86
+ skip_if:
87
+ - "'$var(DEFAULT_WORKSPACE_NAME)' == ''"
88
+ method: "POST"
89
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/$var(DEFAULT_WORKSPACE_NAME)/update/{$stored.managed_account_id}"
90
+ request_headers:
91
+ - x-api-token: "{$stored.admin_token}"
92
+ send_as: "json"
93
+ body:
94
+ username: "e2e_updated_{$stored.guest_seed_account_id}"
95
+ expect:
96
+ status: 200
97
+ body:
98
+ errorCode: number
99
+ errorCodeStr: string
100
+ message: string
101
+
102
+ - name: "Set created account credentials by workspace"
103
+ skip_if:
104
+ - "'$var(DEFAULT_WORKSPACE_NAME)' == ''"
105
+ method: "POST"
106
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/$var(DEFAULT_WORKSPACE_NAME)/credentials/{$stored.managed_account_id}"
107
+ request_headers:
108
+ - x-api-token: "{$stored.admin_token}"
109
+ send_as: "json"
110
+ body:
111
+ password: "e2e_account_pwd_v2"
112
+ expect:
113
+ status: 200
114
+ body:
115
+ errorCode: number
116
+ errorCodeStr: string
117
+ message: string
118
+
119
+ - name: "Login updated account with new credentials"
120
+ skip_if:
121
+ - "'$var(DEFAULT_WORKSPACE_NAME)' == ''"
122
+ method: "POST"
123
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
124
+ send_as: "json"
125
+ body:
126
+ device: "e2e_test_device"
127
+ pseudo: "e2e_updated_{$stored.guest_seed_account_id}"
128
+ password: "e2e_account_pwd_v2"
129
+ expect:
130
+ status: 200
131
+ body:
132
+ errorCode: number
133
+ errorCodeStr: string
134
+ message: string
135
+ response:
136
+ accountId: string
137
+ token: string
138
+ save:
139
+ managed_account_token: "{{body.response.token}}"
140
+ assertions:
141
+ - "{{body.response.accountId}} == '{$stored.managed_account_id}'"
142
+
143
+ - name: "Delete created account by workspace"
144
+ skip_if:
145
+ - "'$var(DEFAULT_WORKSPACE_NAME)' == ''"
146
+ method: "DELETE"
147
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/$var(DEFAULT_WORKSPACE_NAME)/delete/{$stored.managed_account_id}"
148
+ request_headers:
149
+ - x-api-token: "{$stored.admin_token}"
150
+ expect:
151
+ status: 200
152
+ body:
153
+ errorCode: number
154
+ errorCodeStr: string
155
+ message: string
156
+
157
+ - name: "Login should fail for deleted account"
158
+ skip_if:
159
+ - "'$var(DEFAULT_WORKSPACE_NAME)' == ''"
160
+ method: "POST"
161
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
162
+ send_as: "json"
163
+ body:
164
+ device: "e2e_test_device"
165
+ pseudo: "e2e_updated_{$stored.guest_seed_account_id}"
166
+ password: "e2e_account_pwd_v2"
167
+ expect:
168
+ status: 401
169
+ body:
170
+ errorCode: number
171
+ errorCodeStr: string
172
+ message: string