test: tighten gateway proxy repair assertions · openclaw/openclaw@decc8e8
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -456,14 +456,11 @@ describe("maybeRepairGatewayServiceConfig", () => {
|
456 | 456 | |
457 | 457 | await runRepair({ gateway: {} }); |
458 | 458 | |
459 | | -expect(mocks.install).toHaveBeenCalledWith( |
460 | | -expect.objectContaining({ |
461 | | -environment: expect.not.objectContaining({ |
462 | | -HTTP_PROXY: expect.any(String), |
463 | | -HTTPS_PROXY: expect.any(String), |
464 | | -}), |
465 | | -}), |
466 | | -); |
| 459 | +expect(mocks.install).toHaveBeenCalledOnce(); |
| 460 | +const installOptions = mocks.install.mock.calls[0]?.[0]; |
| 461 | +expect(installOptions?.environment).toStrictEqual({}); |
| 462 | +expect(Object.hasOwn(installOptions?.environment ?? {}, "HTTP_PROXY")).toBe(false); |
| 463 | +expect(Object.hasOwn(installOptions?.environment ?? {}, "HTTPS_PROXY")).toBe(false); |
467 | 464 | }); |
468 | 465 | |
469 | 466 | it("uses OPENCLAW_GATEWAY_TOKEN when config token is missing", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。