fix(ci): align tests with runtime barrels · openclaw/openclaw@467ee70
steipete
·
2026-04-27
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -266,8 +266,6 @@ async function monitorWithAutoAbort(opts: Omit<MonitorTelegramOpts, "abortSignal
|
266 | 266 | vi.mock("openclaw/plugin-sdk/runtime-config-snapshot", async () => { |
267 | 267 | return { |
268 | 268 | getRuntimeConfig: getRuntimeConfigMock, |
269 | | -resolveAgentMaxConcurrent: (cfg: { agents?: { defaults?: { maxConcurrent?: number } } }) => |
270 | | -cfg.agents?.defaults?.maxConcurrent ?? 1, |
271 | 269 | }; |
272 | 270 | }); |
273 | 271 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -22,6 +22,7 @@ vi.mock("openclaw/plugin-sdk/config-mutation", async () => {
|
22 | 22 | ...actual, |
23 | 23 | readConfigFileSnapshotForWrite, |
24 | 24 | replaceConfigFile, |
| 25 | + writeConfigFile, |
25 | 26 | }; |
26 | 27 | }); |
27 | 28 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -52,6 +52,7 @@ function createCompactionContext(params: {
|
52 | 52 | compactionCount += 1; |
53 | 53 | }, |
54 | 54 | getCompactionCount: () => compactionCount, |
| 55 | +noteCompactionTokensAfter: vi.fn(), |
55 | 56 | } as unknown as EmbeddedPiSubscribeContext; |
56 | 57 | } |
57 | 58 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -59,6 +59,7 @@ describe("compaction hook wiring", () => {
|
59 | 59 | maybeResolveCompactionWait: vi.fn(), |
60 | 60 | incrementCompactionCount: vi.fn(), |
61 | 61 | getCompactionCount: () => params.compactionCount ?? 0, |
| 62 | +noteCompactionTokensAfter: vi.fn(), |
62 | 63 | ...(params.withRetryHooks |
63 | 64 | ? { |
64 | 65 | noteCompactionRetry: vi.fn(), |
@@ -251,6 +252,7 @@ describe("compaction hook wiring", () => {
|
251 | 252 | maybeResolveCompactionWait: vi.fn(), |
252 | 253 | getCompactionCount: () => 1, |
253 | 254 | incrementCompactionCount: vi.fn(), |
| 255 | +noteCompactionTokensAfter: vi.fn(), |
254 | 256 | }; |
255 | 257 | |
256 | 258 | runCompactionEnd(ctx, { willRetry: false, result: { summary: "compacted" } }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。