test: update gateway config write expectation · openclaw/openclaw@0ed24da
steipete
·
2026-05-18
·
via Recent Commits to openclaw:main
File tree
src/gateway/server-methods
| Original file line number | Diff line number | Diff line change |
|---|
@@ -76,6 +76,12 @@ vi.mock("../../infra/restart-sentinel.js", async () => {
|
76 | 76 | |
77 | 77 | const { configHandlers } = await import("./config.js"); |
78 | 78 | |
| 79 | +const GATEWAY_CONFIG_WRITE_OPTIONS = { |
| 80 | +runtimeRefresh: { |
| 81 | +includeAuthStoreRefs: false, |
| 82 | +}, |
| 83 | +}; |
| 84 | + |
79 | 85 | afterEach(() => { |
80 | 86 | vi.clearAllMocks(); |
81 | 87 | }); |
@@ -128,7 +134,7 @@ describe("config shared auth disconnects", () => {
|
128 | 134 | await configHandlers["config.set"](options); |
129 | 135 | await flushConfigHandlerMicrotasks(); |
130 | 136 | |
131 | | -expect(writeConfigFileMock).toHaveBeenCalledWith(submittedConfig, {}); |
| 137 | +expect(writeConfigFileMock).toHaveBeenCalledWith(submittedConfig, GATEWAY_CONFIG_WRITE_OPTIONS); |
132 | 138 | expect(respond).toHaveBeenCalledWith( |
133 | 139 | true, |
134 | 140 | { |
@@ -170,7 +176,7 @@ describe("config shared auth disconnects", () => {
|
170 | 176 | await configHandlers["config.set"](options); |
171 | 177 | await flushConfigHandlerMicrotasks(); |
172 | 178 | |
173 | | -expect(writeConfigFileMock).toHaveBeenCalledWith(nextConfig, {}); |
| 179 | +expect(writeConfigFileMock).toHaveBeenCalledWith(nextConfig, GATEWAY_CONFIG_WRITE_OPTIONS); |
174 | 180 | expect(disconnectClientsUsingSharedGatewayAuth).not.toHaveBeenCalled(); |
175 | 181 | expect(scheduleGatewaySigusr1RestartMock).not.toHaveBeenCalled(); |
176 | 182 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。