From 513fd835a1a5e6c7911eef2d7c3d6fba57b54126 Mon Sep 17 00:00:00 2001 From: gejifeng Date: Wed, 11 Feb 2026 10:46:20 +0000 Subject: [PATCH] tests: fix vLLM onboarding selection --- src/commands/model-picker.e2e.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/commands/model-picker.e2e.test.ts b/src/commands/model-picker.e2e.test.ts index b23cfa06742..5d44e244f79 100644 --- a/src/commands/model-picker.e2e.test.ts +++ b/src/commands/model-picker.e2e.test.ts @@ -21,10 +21,12 @@ const ensureAuthProfileStore = vi.hoisted(() => ); const listProfilesForProvider = vi.hoisted(() => vi.fn(() => [])); const upsertAuthProfile = vi.hoisted(() => vi.fn()); +const upsertAuthProfileWithLock = vi.hoisted(() => vi.fn(async () => {})); vi.mock("../agents/auth-profiles.js", () => ({ ensureAuthProfileStore, listProfilesForProvider, upsertAuthProfile, + upsertAuthProfileWithLock, })); const resolveEnvApiKey = vi.hoisted(() => vi.fn(() => undefined)); @@ -99,9 +101,10 @@ describe("promptDefaultModel", () => { includeManual: false, includeVllm: true, ignoreAllowlist: true, + agentDir: "/tmp/openclaw-agent", }); - expect(upsertAuthProfile).toHaveBeenCalledWith( + expect(upsertAuthProfileWithLock).toHaveBeenCalledWith( expect.objectContaining({ profileId: "vllm:default", credential: expect.objectContaining({ provider: "vllm" }),