fix(cli): ignore stale memory cleanup after package update · openclaw/openclaw@09cb0b0
vincentkoc
·
2026-04-29
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -545,6 +545,17 @@ describe("runCli exit behavior", () => {
|
545 | 545 | expect(closeActiveMemorySearchManagersMock).toHaveBeenCalledTimes(1); |
546 | 546 | }); |
547 | 547 | |
| 548 | +it("does not fail the command when memory cleanup is unavailable", async () => { |
| 549 | +tryRouteCliMock.mockResolvedValueOnce(true); |
| 550 | +hasMemoryRuntimeMock.mockImplementationOnce(() => { |
| 551 | +throw new Error("stale memory-state chunk"); |
| 552 | +}); |
| 553 | + |
| 554 | +await expect(runCli(["node", "openclaw", "status"])).resolves.toBeUndefined(); |
| 555 | + |
| 556 | +expect(closeActiveMemorySearchManagersMock).not.toHaveBeenCalled(); |
| 557 | +}); |
| 558 | + |
548 | 559 | it("returns after a handled container-target invocation", async () => { |
549 | 560 | maybeRunCliInContainerMock.mockReturnValueOnce({ handled: true, exitCode: 0 }); |
550 | 561 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。