test: update gateway config write expectation

This commit is contained in:
Peter Steinberger
2026-05-18 13:47:33 +01:00
parent e973aa278f
commit 0ed24da686

View File

@@ -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();
});