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:
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