mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:30:43 +00:00
fix(ci): align tests with runtime barrels
This commit is contained in:
@@ -266,8 +266,6 @@ async function monitorWithAutoAbort(opts: Omit<MonitorTelegramOpts, "abortSignal
|
||||
vi.mock("openclaw/plugin-sdk/runtime-config-snapshot", async () => {
|
||||
return {
|
||||
getRuntimeConfig: getRuntimeConfigMock,
|
||||
resolveAgentMaxConcurrent: (cfg: { agents?: { defaults?: { maxConcurrent?: number } } }) =>
|
||||
cfg.agents?.defaults?.maxConcurrent ?? 1,
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ vi.mock("openclaw/plugin-sdk/config-mutation", async () => {
|
||||
...actual,
|
||||
readConfigFileSnapshotForWrite,
|
||||
replaceConfigFile,
|
||||
writeConfigFile,
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ function createCompactionContext(params: {
|
||||
compactionCount += 1;
|
||||
},
|
||||
getCompactionCount: () => compactionCount,
|
||||
noteCompactionTokensAfter: vi.fn(),
|
||||
} as unknown as EmbeddedPiSubscribeContext;
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ describe("compaction hook wiring", () => {
|
||||
maybeResolveCompactionWait: vi.fn(),
|
||||
incrementCompactionCount: vi.fn(),
|
||||
getCompactionCount: () => params.compactionCount ?? 0,
|
||||
noteCompactionTokensAfter: vi.fn(),
|
||||
...(params.withRetryHooks
|
||||
? {
|
||||
noteCompactionRetry: vi.fn(),
|
||||
@@ -251,6 +252,7 @@ describe("compaction hook wiring", () => {
|
||||
maybeResolveCompactionWait: vi.fn(),
|
||||
getCompactionCount: () => 1,
|
||||
incrementCompactionCount: vi.fn(),
|
||||
noteCompactionTokensAfter: vi.fn(),
|
||||
};
|
||||
|
||||
runCompactionEnd(ctx, { willRetry: false, result: { summary: "compacted" } });
|
||||
|
||||
Reference in New Issue
Block a user