test: optimize gateway infra memory and security coverage

This commit is contained in:
Peter Steinberger
2026-02-21 21:43:20 +00:00
parent 58254b3b57
commit cc2ff68947
24 changed files with 1163 additions and 1284 deletions

View File

@@ -123,7 +123,7 @@ describe("callGateway url resolution", () => {
label: "falls back to loopback when local bind is auto without tailnet IP",
tailnetIp: undefined,
},
])("$label", async ({ tailnetIp }) => {
])("local auto-bind: $label", async ({ tailnetIp }) => {
loadConfig.mockReturnValue({ gateway: { mode: "local", bind: "auto" } });
resolveGatewayPort.mockReturnValue(18800);
pickPrimaryTailnetIPv4.mockReturnValue(tailnetIp);
@@ -218,7 +218,7 @@ describe("callGateway url resolution", () => {
call: () => callGatewayCli({ method: "health" }),
expectedScopes: ["operator.admin", "operator.approvals", "operator.pairing"],
},
])("$label", async ({ call, expectedScopes }) => {
])("scope selection: $label", async ({ call, expectedScopes }) => {
setLocalLoopbackGatewayConfig();
await call();
expect(lastClientOptions?.scopes).toEqual(expectedScopes);