test: fix Windows CI failures (paths, timeouts, sourceLabel)
Made-with: Cursor
This commit is contained in:
parent
bc7b1dfa10
commit
a0395bb71b
@ -18,7 +18,9 @@ describe("runCronIsolatedAgentTurn auth profile propagation (#20624)", () => {
|
||||
setupIsolatedAgentTurnMocks({ fast: true });
|
||||
});
|
||||
|
||||
it("passes authProfileId to runEmbeddedPiAgent when auth profiles exist", async () => {
|
||||
it(
|
||||
"passes authProfileId to runEmbeddedPiAgent when auth profiles exist",
|
||||
async () => {
|
||||
await withTempCronHome(async (home) => {
|
||||
const storePath = await writeSessionStore(home, { lastProvider: "webchat", lastTo: "" });
|
||||
|
||||
@ -84,5 +86,7 @@ describe("runCronIsolatedAgentTurn auth profile propagation (#20624)", () => {
|
||||
|
||||
expect(callArgs?.authProfileId).toBe("openrouter:default");
|
||||
});
|
||||
});
|
||||
},
|
||||
process.platform === "win32" ? 240_000 : 120_000,
|
||||
);
|
||||
});
|
||||
|
||||
@ -154,24 +154,28 @@ describe("runCronIsolatedAgentTurn: subagent model resolution (#11461)", () => {
|
||||
expectedProvider: "google",
|
||||
expectedModel: "gemini-2.5-flash",
|
||||
},
|
||||
])("$name", async ({ cfgOverrides, expectedProvider, expectedModel }) => {
|
||||
await withTempHome(async (home) => {
|
||||
const resolvedCfg =
|
||||
cfgOverrides === undefined
|
||||
? undefined
|
||||
: ({
|
||||
agents: {
|
||||
defaults: {
|
||||
...cfgOverrides.agents?.defaults,
|
||||
workspace: path.join(home, "openclaw"),
|
||||
])(
|
||||
"$name",
|
||||
async ({ cfgOverrides, expectedProvider, expectedModel }) => {
|
||||
await withTempHome(async (home) => {
|
||||
const resolvedCfg =
|
||||
cfgOverrides === undefined
|
||||
? undefined
|
||||
: ({
|
||||
agents: {
|
||||
defaults: {
|
||||
...cfgOverrides.agents?.defaults,
|
||||
workspace: path.join(home, "openclaw"),
|
||||
},
|
||||
},
|
||||
},
|
||||
} satisfies Partial<OpenClawConfig>);
|
||||
const call = await runSubagentModelCase({ home, cfgOverrides: resolvedCfg });
|
||||
expect(call?.provider).toBe(expectedProvider);
|
||||
expect(call?.model).toBe(expectedModel);
|
||||
});
|
||||
});
|
||||
} satisfies Partial<OpenClawConfig>);
|
||||
const call = await runSubagentModelCase({ home, cfgOverrides: resolvedCfg });
|
||||
expect(call?.provider).toBe(expectedProvider);
|
||||
expect(call?.model).toBe(expectedModel);
|
||||
});
|
||||
},
|
||||
process.platform === "win32" ? 240_000 : 120_000,
|
||||
);
|
||||
|
||||
it("explicit job model override takes precedence over subagents.model", async () => {
|
||||
await withTempHome(async (home) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user