fix: tighten runner failover test types (openclaw#39820) thanks @lupuletic

This commit is contained in:
Darshil 2026-03-13 00:23:15 -07:00 committed by Darshil
parent 105dcd69e7
commit dd6ecd5bfa
2 changed files with 16 additions and 7 deletions

View File

@ -210,12 +210,21 @@ vi.mock("../defaults.js", () => ({
}));
export const mockedCoerceToFailoverError = vi.fn();
export const mockedDescribeFailoverError = vi.fn((err: unknown) => ({
message: err instanceof Error ? err.message : String(err),
reason: undefined,
status: undefined,
code: undefined,
}));
type MockFailoverErrorDescription = {
message: string;
reason: string | undefined;
status: number | undefined;
code: string | undefined;
};
export const mockedDescribeFailoverError = vi.fn(
(err: unknown): MockFailoverErrorDescription => ({
message: err instanceof Error ? err.message : String(err),
reason: undefined,
status: undefined,
code: undefined,
}),
);
export const mockedResolveFailoverStatus = vi.fn();
vi.mock("../failover-error.js", () => ({

View File

@ -301,7 +301,7 @@ describe("runEmbeddedPiAgent overflow compaction trigger routing", () => {
await expect(
runEmbeddedPiAgent({
...overflowBaseRunParams,
cfg: {
config: {
agents: {
defaults: {
model: {