mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-24 10:59:49 +00:00
test: update gateway config write expectation
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user