mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 15:24:58 +00:00
refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -29,7 +29,7 @@ const mocks = vi.hoisted(() => {
|
||||
|
||||
return {
|
||||
store,
|
||||
resolveClawdbotAgentDir: vi.fn().mockReturnValue("/tmp/clawdbot-agent"),
|
||||
resolveMoltbotAgentDir: vi.fn().mockReturnValue("/tmp/moltbot-agent"),
|
||||
ensureAuthProfileStore: vi.fn().mockReturnValue(store),
|
||||
listProfilesForProvider: vi.fn((s: typeof store, provider: string) => {
|
||||
return Object.entries(s.profiles)
|
||||
@@ -39,7 +39,7 @@ const mocks = vi.hoisted(() => {
|
||||
resolveAuthProfileDisplayLabel: vi.fn(({ profileId }: { profileId: string }) => profileId),
|
||||
resolveAuthStorePathForDisplay: vi
|
||||
.fn()
|
||||
.mockReturnValue("/tmp/clawdbot-agent/auth-profiles.json"),
|
||||
.mockReturnValue("/tmp/moltbot-agent/auth-profiles.json"),
|
||||
resolveEnvApiKey: vi.fn((provider: string) => {
|
||||
if (provider === "openai") {
|
||||
return {
|
||||
@@ -72,7 +72,7 @@ const mocks = vi.hoisted(() => {
|
||||
});
|
||||
|
||||
vi.mock("../../agents/agent-paths.js", () => ({
|
||||
resolveClawdbotAgentDir: mocks.resolveClawdbotAgentDir,
|
||||
resolveMoltbotAgentDir: mocks.resolveMoltbotAgentDir,
|
||||
}));
|
||||
|
||||
vi.mock("../../agents/auth-profiles.js", async (importOriginal) => {
|
||||
@@ -118,7 +118,7 @@ describe("modelsStatusCommand auth overview", () => {
|
||||
const payload = JSON.parse(String((runtime.log as vi.Mock).mock.calls[0][0]));
|
||||
|
||||
expect(payload.defaultModel).toBe("anthropic/claude-opus-4-5");
|
||||
expect(payload.auth.storePath).toBe("/tmp/clawdbot-agent/auth-profiles.json");
|
||||
expect(payload.auth.storePath).toBe("/tmp/moltbot-agent/auth-profiles.json");
|
||||
expect(payload.auth.shellEnvFallback.enabled).toBe(true);
|
||||
expect(payload.auth.shellEnvFallback.appliedKeys).toContain("OPENAI_API_KEY");
|
||||
expect(payload.auth.missingProvidersInUse).toEqual([]);
|
||||
|
||||
Reference in New Issue
Block a user