From decc8e8e5a96c560b5efa31ffecd7d40a1f05013 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 9 May 2026 07:18:05 +0100 Subject: [PATCH] test: tighten gateway proxy repair assertions --- src/commands/doctor-gateway-services.test.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/commands/doctor-gateway-services.test.ts b/src/commands/doctor-gateway-services.test.ts index 1f3b71f3e31..1978e79eef6 100644 --- a/src/commands/doctor-gateway-services.test.ts +++ b/src/commands/doctor-gateway-services.test.ts @@ -456,14 +456,11 @@ describe("maybeRepairGatewayServiceConfig", () => { await runRepair({ gateway: {} }); - expect(mocks.install).toHaveBeenCalledWith( - expect.objectContaining({ - environment: expect.not.objectContaining({ - HTTP_PROXY: expect.any(String), - HTTPS_PROXY: expect.any(String), - }), - }), - ); + expect(mocks.install).toHaveBeenCalledOnce(); + const installOptions = mocks.install.mock.calls[0]?.[0]; + expect(installOptions?.environment).toStrictEqual({}); + expect(Object.hasOwn(installOptions?.environment ?? {}, "HTTP_PROXY")).toBe(false); + expect(Object.hasOwn(installOptions?.environment ?? {}, "HTTPS_PROXY")).toBe(false); }); it("uses OPENCLAW_GATEWAY_TOKEN when config token is missing", async () => {