diff --git a/src/gateway/server-methods/config.shared-auth.test.ts b/src/gateway/server-methods/config.shared-auth.test.ts index cf1c8df8677..1e7958e260e 100644 --- a/src/gateway/server-methods/config.shared-auth.test.ts +++ b/src/gateway/server-methods/config.shared-auth.test.ts @@ -76,6 +76,12 @@ vi.mock("../../infra/restart-sentinel.js", async () => { const { configHandlers } = await import("./config.js"); +const GATEWAY_CONFIG_WRITE_OPTIONS = { + runtimeRefresh: { + includeAuthStoreRefs: false, + }, +}; + afterEach(() => { vi.clearAllMocks(); }); @@ -128,7 +134,7 @@ describe("config shared auth disconnects", () => { await configHandlers["config.set"](options); await flushConfigHandlerMicrotasks(); - expect(writeConfigFileMock).toHaveBeenCalledWith(submittedConfig, {}); + expect(writeConfigFileMock).toHaveBeenCalledWith(submittedConfig, GATEWAY_CONFIG_WRITE_OPTIONS); expect(respond).toHaveBeenCalledWith( true, { @@ -170,7 +176,7 @@ describe("config shared auth disconnects", () => { await configHandlers["config.set"](options); await flushConfigHandlerMicrotasks(); - expect(writeConfigFileMock).toHaveBeenCalledWith(nextConfig, {}); + expect(writeConfigFileMock).toHaveBeenCalledWith(nextConfig, GATEWAY_CONFIG_WRITE_OPTIONS); expect(disconnectClientsUsingSharedGatewayAuth).not.toHaveBeenCalled(); expect(scheduleGatewaySigusr1RestartMock).not.toHaveBeenCalled(); });