





























@@ -4,7 +4,6 @@ import { describe, expect, it } from "vitest";
44import type { OpenClawConfig } from "../config/config.js";
55import {
66resolveGatewayConnectionAuth,
7-resolveGatewayConnectionAuthFromConfig,
87type GatewayConnectionAuthOptions,
98} from "./connection-auth.js";
109@@ -192,13 +191,7 @@ describe("resolveGatewayConnectionAuth", () => {
192191 env,
193192 ...options,
194193});
195-const syncResolved = resolveGatewayConnectionAuthFromConfig({
196-cfg: cfgLocal,
197- env,
198- ...options,
199-});
200194expect(asyncResolved).toEqual(expected);
201-expect(syncResolved).toEqual(expected);
202195});
203196204197it("resolves local SecretRef token when OPENCLAW env is absent", async () => {
@@ -315,13 +308,6 @@ describe("resolveGatewayConnectionAuth", () => {
315308localTokenPrecedence: "config-first",
316309}),
317310).rejects.toThrow("gateway.auth.token");
318-expect(() =>
319-resolveGatewayConnectionAuthFromConfig({
320-cfg: config,
321- env,
322-localTokenPrecedence: "config-first",
323-}),
324-).toThrow("gateway.auth.token");
325311});
326312327313it("throws when config-first password SecretRef cannot resolve even if env password exists", async () => {
@@ -350,12 +336,5 @@ describe("resolveGatewayConnectionAuth", () => {
350336localPasswordPrecedence: "config-first", // pragma: allowlist secret
351337}),
352338).rejects.toThrow("gateway.auth.password");
353-expect(() =>
354-resolveGatewayConnectionAuthFromConfig({
355-cfg: config,
356- env,
357-localPasswordPrecedence: "config-first", // pragma: allowlist secret
358-}),
359-).toThrow("gateway.auth.password");
360339});
361340});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。