mirror of
https://github.com/juanfont/headscale.git
synced 2026-07-17 16:36:02 +00:00
Pin every endpoint's behaviour with golden fixtures captured from the retiring grpc-gateway (timestamps and secrets neutralised). Error cases assert their HTTP status independently of the golden via assertStatus, so a blind regenerate cannot re-pin a wrong code; HEADSCALE_UPDATE_GOLDEN rewrites the fixtures. A unit test exercises the API-key auth middleware on the real server router. Exclude the emitted spec and goldens from pre-commit checks.
15 lines
273 B
JSON
15 lines
273 B
JSON
{
|
|
"status": 200,
|
|
"body": {
|
|
"user": {
|
|
"createdAt": "\u003ctimestamp\u003e",
|
|
"displayName": "Test",
|
|
"email": "t@example.com",
|
|
"id": "1",
|
|
"name": "test",
|
|
"profilePicUrl": "",
|
|
"provider": "",
|
|
"providerId": ""
|
|
}
|
|
}
|
|
}
|