mirror of https://github.com/openclaw/openclaw.git
fix: tighten runner failover test types (openclaw#39820) thanks @lupuletic
This commit is contained in:
parent
105dcd69e7
commit
dd6ecd5bfa
|
|
@ -210,12 +210,21 @@ vi.mock("../defaults.js", () => ({
|
|||
}));
|
||||
|
||||
export const mockedCoerceToFailoverError = vi.fn();
|
||||
export const mockedDescribeFailoverError = vi.fn((err: unknown) => ({
|
||||
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", () => ({
|
||||
|
|
|
|||
|
|
@ -301,7 +301,7 @@ describe("runEmbeddedPiAgent overflow compaction trigger routing", () => {
|
|||
await expect(
|
||||
runEmbeddedPiAgent({
|
||||
...overflowBaseRunParams,
|
||||
cfg: {
|
||||
config: {
|
||||
agents: {
|
||||
defaults: {
|
||||
model: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue