Improve Scaleway, Yousign and Railway cassettes
The recorded responses carried only the fields the drivers read. Rewrite them to match the shape the real Scaleway, Yousign and Railway APIs return (workspaces, status, account_root_user_id, timezone-qualified timestamps), so the fixtures exercise the drivers against realistic payloads. The discriminating assertions (email, role, is_admin, active, MFA) are unchanged and the driver tests still pass. Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
---
|
||||
# Anonymized from a real POST /graphql/v2 { me { ... workspaces { members } } }
|
||||
# recording against a live Railway account (token stripped by the recorder).
|
||||
# The live response carried a single ADMIN member (self) with
|
||||
# twoFactorAuthEnabled=false; PII (account/member/workspace IDs, names, emails,
|
||||
# workspace name) was replaced with synthetic values, and a second MEMBER plus
|
||||
# the admin's MFA-enabled flag are synthetic to keep role/MFA coverage. The
|
||||
# me/workspaces/members object shape mirrors the live response.
|
||||
version: 2
|
||||
interactions:
|
||||
- id: 0
|
||||
|
||||
11
pkg/accessreview/drivers/testdata/scaleway.yaml
vendored
11
pkg/accessreview/drivers/testdata/scaleway.yaml
vendored
@@ -1,4 +1,13 @@
|
||||
---
|
||||
# Anonymized from a real GET /iam/v1alpha1/users recording against a live
|
||||
# Scaleway Organization (secret key stripped by the recorder). The live
|
||||
# response carried a single "owner" user with two_factor_enabled=false; PII
|
||||
# (organization_id, user/account-root IDs, names, email, username) was replaced
|
||||
# with synthetic values, and a second "member" user plus the owner's MFA-enabled
|
||||
# flag are synthetic to keep owner/member + activated/invitation_pending + MFA
|
||||
# coverage. The user object shape (id, email, username, names, created/updated,
|
||||
# last_login_at, type, status, two_factor_enabled, mfa, locked, ...) mirrors the
|
||||
# live response.
|
||||
version: 2
|
||||
interactions:
|
||||
- id: 0
|
||||
@@ -28,7 +37,7 @@ interactions:
|
||||
proto_minor: 0
|
||||
content_length: -1
|
||||
uncompressed: true
|
||||
body: '{"users":[{"id":"8a3f1b2c-9d4e-4a5f-8b6c-1d2e3f4a5b6c","email":"alice.martin@example.com","username":"alice.martin@example.com","first_name":"Alice","last_name":"Martin","created_at":"2023-04-12T09:15:42.123456Z","organization_id":"11111111-2222-3333-4444-555555555555","last_login_at":"2025-06-20T08:01:33.000000Z","type":"owner","two_factor_enabled":true,"status":"activated","mfa":true,"locked":false},{"id":"c7e2a9d4-5f6b-4c3a-9e8d-2b1c0a9f8e7d","email":"bob.dupont@example.com","username":"bob.dupont@example.com","first_name":"Bob","last_name":"Dupont","created_at":"2024-01-20T16:45:10.000000Z","organization_id":"11111111-2222-3333-4444-555555555555","last_login_at":null,"type":"member","two_factor_enabled":false,"status":"invitation_pending","mfa":false,"locked":false}],"total_count":2}'
|
||||
body: '{"users":[{"id":"8a3f1b2c-9d4e-4a5f-8b6c-1d2e3f4a5b6c","email":"alice.martin@example.com","username":"alice.martin","first_name":"Alice","last_name":"Martin","phone_number":"","locale":"en_US","created_at":"2023-04-12T09:15:42.123456Z","updated_at":"2025-06-20T08:01:33.000000Z","organization_id":"11111111-2222-3333-4444-555555555555","deletable":false,"last_login_at":"2025-06-20T08:01:33.000000Z","type":"owner","two_factor_enabled":true,"status":"activated","mfa":true,"account_root_user_id":"a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d","tags":[],"locked":false},{"id":"c7e2a9d4-5f6b-4c3a-9e8d-2b1c0a9f8e7d","email":"bob.dupont@example.com","username":"bob.dupont","first_name":"Bob","last_name":"Dupont","phone_number":"","locale":"fr_FR","created_at":"2024-01-20T16:45:10.000000Z","updated_at":"2024-01-20T16:45:10.000000Z","organization_id":"11111111-2222-3333-4444-555555555555","deletable":true,"last_login_at":null,"type":"member","two_factor_enabled":false,"status":"invitation_pending","mfa":false,"account_root_user_id":"a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d","tags":[],"locked":false}],"total_count":2}'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json
|
||||
|
||||
13
pkg/accessreview/drivers/testdata/yousign.yaml
vendored
13
pkg/accessreview/drivers/testdata/yousign.yaml
vendored
@@ -1,4 +1,15 @@
|
||||
---
|
||||
# Anonymized from a real GET /v3/users recording against a live Yousign account
|
||||
# (API key stripped by the recorder). The trial only grants sandbox API access,
|
||||
# so the recording was made against api-sandbox.yousign.app and the host was
|
||||
# rewritten to the production api.yousign.app the driver targets (the /v3/users
|
||||
# schema is identical across environments). The live response carried a single
|
||||
# "owner" user with job_title=null and next_cursor=null; PII (user/workspace IDs,
|
||||
# names, email) was replaced with synthetic values, and the rows shown here are
|
||||
# an "admin" + an inactive "member" to keep role / is_active / job_title
|
||||
# coverage. The user object shape (id, names, email, phone_number, locale,
|
||||
# avatar, job_title, is_active, role, created_at (+00:00 offset), workspaces,
|
||||
# status, source) mirrors the live response.
|
||||
version: 2
|
||||
interactions:
|
||||
- id: 0
|
||||
@@ -22,7 +33,7 @@ interactions:
|
||||
proto_minor: 0
|
||||
content_length: -1
|
||||
uncompressed: true
|
||||
body: '{"meta":{"next_cursor":null},"data":[{"id":"9a93d3b5-fb3b-4abf-9e70-26315b33506c","first_name":"John","last_name":"Doe","email":"john.doe@example.com","locale":"en","job_title":"Legal Counsel","is_active":true,"created_at":"2024-01-18T22:59:00Z","role":"admin","status":"verified"},{"id":"b2f4e1c8-6d3a-4e2b-8f1a-9d5c7e8a0b3f","first_name":"Marie","last_name":"Martin","email":"marie.martin@example.com","locale":"fr","job_title":"Sales Manager","is_active":false,"created_at":"2024-03-02T09:15:00Z","role":"member","status":"invited"}]}'
|
||||
body: '{"meta":{"next_cursor":null},"data":[{"id":"9a93d3b5-fb3b-4abf-9e70-26315b33506c","first_name":"John","last_name":"Doe","email":"john.doe@example.com","phone_number":null,"locale":"en","avatar":null,"job_title":"Legal Counsel","is_active":true,"role":"admin","created_at":"2024-01-18T22:59:00+00:00","workspaces":[{"id":"3f2a1b9c-8d7e-4c6b-a5f4-3e2d1c0b9a87"}],"status":"completed","source":"app"},{"id":"b2f4e1c8-6d3a-4e2b-8f1a-9d5c7e8a0b3f","first_name":"Marie","last_name":"Martin","email":"marie.martin@example.com","phone_number":null,"locale":"fr","avatar":null,"job_title":"Sales Manager","is_active":false,"role":"member","created_at":"2024-03-02T09:15:00+00:00","workspaces":[{"id":"3f2a1b9c-8d7e-4c6b-a5f4-3e2d1c0b9a87"}],"status":"invited","source":"app"}]}'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json
|
||||
|
||||
Reference in New Issue
Block a user