mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 13:05:01 +00: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 listProfilesForProvider = vi.hoisted(() => vi.fn(() => []));
|
||||||
const upsertAuthProfile = vi.hoisted(() => vi.fn());
|
const upsertAuthProfile = vi.hoisted(() => vi.fn());
|
||||||
|
const upsertAuthProfileWithLock = vi.hoisted(() => vi.fn(async () => {}));
|
||||||
vi.mock("../agents/auth-profiles.js", () => ({
|
vi.mock("../agents/auth-profiles.js", () => ({
|
||||||
ensureAuthProfileStore,
|
ensureAuthProfileStore,
|
||||||
listProfilesForProvider,
|
listProfilesForProvider,
|
||||||
upsertAuthProfile,
|
upsertAuthProfile,
|
||||||
|
upsertAuthProfileWithLock,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const resolveEnvApiKey = vi.hoisted(() => vi.fn(() => undefined));
|
const resolveEnvApiKey = vi.hoisted(() => vi.fn(() => undefined));
|
||||||
@@ -99,9 +101,10 @@ describe("promptDefaultModel", () => {
|
|||||||
includeManual: false,
|
includeManual: false,
|
||||||
includeVllm: true,
|
includeVllm: true,
|
||||||
ignoreAllowlist: true,
|
ignoreAllowlist: true,
|
||||||
|
agentDir: "/tmp/openclaw-agent",
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(upsertAuthProfile).toHaveBeenCalledWith(
|
expect(upsertAuthProfileWithLock).toHaveBeenCalledWith(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
profileId: "vllm:default",
|
profileId: "vllm:default",
|
||||||
credential: expect.objectContaining({ provider: "vllm" }),
|
credential: expect.objectContaining({ provider: "vllm" }),
|
||||||
|
|||||||
Reference in New Issue
Block a user