test: guard gateway service install mock call · openclaw/openclaw@2ea90f6
steipete
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -510,10 +510,11 @@ describe("maybeRepairGatewayServiceConfig", () => {
|
510 | 510 | await runRepair({ gateway: {} }); |
511 | 511 | |
512 | 512 | expect(mocks.install).toHaveBeenCalledOnce(); |
513 | | -const installOptions = mocks.install.mock.calls[0]?.[0]; |
514 | | -expect(installOptions?.environment).toStrictEqual({}); |
515 | | -expect(Object.hasOwn(installOptions?.environment ?? {}, "HTTP_PROXY")).toBe(false); |
516 | | -expect(Object.hasOwn(installOptions?.environment ?? {}, "HTTPS_PROXY")).toBe(false); |
| 513 | +const installOptions = requireRecord(callArg(mocks.install, 0, "gateway install"), "install"); |
| 514 | +const environment = requireRecord(installOptions.environment, "install environment"); |
| 515 | +expect(environment).toStrictEqual({}); |
| 516 | +expect(Object.hasOwn(environment, "HTTP_PROXY")).toBe(false); |
| 517 | +expect(Object.hasOwn(environment, "HTTPS_PROXY")).toBe(false); |
517 | 518 | }); |
518 | 519 | |
519 | 520 | it("uses OPENCLAW_GATEWAY_TOKEN when config token is missing", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。