mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 03:03:24 -04:00
tests: fix vLLM onboarding selection
This commit is contained in:
committed by
Peter Steinberger
parent
d44c118334
commit
513fd835a1
@@ -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" }),
|
||||
|
||||
Reference in New Issue
Block a user