mirror of
https://github.com/juanfont/headscale.git
synced 2026-09-15 04:52:03 +09:00
1572ac551d
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.
41 lines
906 B
JSON
41 lines
906 B
JSON
{
|
|
"status": 200,
|
|
"body": {
|
|
"preAuthKeys": [
|
|
{
|
|
"aclTags": [],
|
|
"createdAt": "\u003ctimestamp\u003e",
|
|
"ephemeral": false,
|
|
"expiration": "\u003ctimestamp\u003e",
|
|
"id": "1",
|
|
"key": "\u003csecret\u003e",
|
|
"reusable": true,
|
|
"used": false,
|
|
"user": {
|
|
"createdAt": "\u003ctimestamp\u003e",
|
|
"displayName": "",
|
|
"email": "",
|
|
"id": "1",
|
|
"name": "alice",
|
|
"profilePicUrl": "",
|
|
"provider": "",
|
|
"providerId": ""
|
|
}
|
|
},
|
|
{
|
|
"aclTags": [
|
|
"tag:test"
|
|
],
|
|
"createdAt": "\u003ctimestamp\u003e",
|
|
"ephemeral": true,
|
|
"expiration": "\u003ctimestamp\u003e",
|
|
"id": "2",
|
|
"key": "\u003csecret\u003e",
|
|
"reusable": false,
|
|
"used": false,
|
|
"user": null
|
|
}
|
|
]
|
|
}
|
|
}
|