From aa69a7a84d00473523f2ca63a59f124eaffea84b Mon Sep 17 00:00:00 2001 From: Alex Fallah Date: Tue, 27 Jan 2026 01:19:37 -0500 Subject: [PATCH] test(config): fix gateway.bind tailnet test expectation The test was incorrectly expecting migrateLegacyConfig to return the config when no migrations are applied. The function intentionally returns null in this case to signal 'no changes needed'. --- ...egacy-config-detection.rejects-routing-allowfrom.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config/config.legacy-config-detection.rejects-routing-allowfrom.test.ts b/src/config/config.legacy-config-detection.rejects-routing-allowfrom.test.ts index 83b96e739..1d8c15407 100644 --- a/src/config/config.legacy-config-detection.rejects-routing-allowfrom.test.ts +++ b/src/config/config.legacy-config-detection.rejects-routing-allowfrom.test.ts @@ -218,14 +218,14 @@ describe("legacy config detection", () => { expect(res.config?.gateway?.auth?.mode).toBe("token"); expect((res.config?.gateway as { token?: string })?.token).toBeUndefined(); }); - it("keeps gateway.bind tailnet", async () => { + it("does not migrate gateway.bind tailnet", async () => { vi.resetModules(); const { migrateLegacyConfig } = await import("./config.js"); const res = migrateLegacyConfig({ gateway: { bind: "tailnet" as const }, }); - expect(res.changes).not.toContain("Migrated gateway.bind from 'tailnet' to 'auto'."); - expect(res.config?.gateway?.bind).toBe("tailnet"); + expect(res.changes).toHaveLength(0); + expect(res.config).toBeNull(); }); it('rejects telegram.dmPolicy="open" without allowFrom "*"', async () => { vi.resetModules();