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 mockedCoerceToFailoverError = vi.fn();
|
||||||
export const mockedDescribeFailoverError = vi.fn((err: unknown) => ({
|
type MockFailoverErrorDescription = {
|
||||||
message: err instanceof Error ? err.message : String(err),
|
message: string;
|
||||||
reason: undefined,
|
reason: string | undefined;
|
||||||
status: undefined,
|
status: number | undefined;
|
||||||
code: 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();
|
export const mockedResolveFailoverStatus = vi.fn();
|
||||||
|
|
||||||
vi.mock("../failover-error.js", () => ({
|
vi.mock("../failover-error.js", () => ({
|
||||||
|
|
|
||||||
|
|
@ -301,7 +301,7 @@ describe("runEmbeddedPiAgent overflow compaction trigger routing", () => {
|
||||||
await expect(
|
await expect(
|
||||||
runEmbeddedPiAgent({
|
runEmbeddedPiAgent({
|
||||||
...overflowBaseRunParams,
|
...overflowBaseRunParams,
|
||||||
cfg: {
|
config: {
|
||||||
agents: {
|
agents: {
|
||||||
defaults: {
|
defaults: {
|
||||||
model: {
|
model: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue