test(state): canonicalize sqlite volume assertions · openclaw/openclaw@1609365
vincentkoc
·
2026-06-20
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -62,7 +62,7 @@ describe("sqlite WAL maintenance", () => {
|
62 | 62 | databasePath: path.join(tempDir, "missing", "openclaw.sqlite"), |
63 | 63 | }); |
64 | 64 | |
65 | | -expect(statfs).toHaveBeenCalledWith(tempDir); |
| 65 | +expect(statfs).toHaveBeenCalledWith(fs.realpathSync(tempDir)); |
66 | 66 | expect(db["prepare"]).toHaveBeenCalledWith("PRAGMA journal_mode = DELETE;"); |
67 | 67 | expect(db["exec"]).not.toHaveBeenCalled(); |
68 | 68 | expect(maintenance.checkpoint()).toBe(true); |
@@ -238,9 +238,10 @@ describe("sqlite WAL maintenance", () => {
|
238 | 238 | try { |
239 | 239 | fs.mkdirSync(mountDir); |
240 | 240 | fs.symlinkSync(mountDir, linkedDir); |
| 241 | +const canonicalMountDir = fs.realpathSync(mountDir); |
241 | 242 | vi.spyOn(fs, "statfsSync").mockReturnValue(statfsFixture(0)); |
242 | 243 | vi.spyOn(fs, "readFileSync").mockReturnValue( |
243 | | -`42 12 0:41 / ${mountDir} rw,relatime - fuse.sshfs user@host:/share rw\n`, |
| 244 | +`42 12 0:41 / ${canonicalMountDir} rw,relatime - fuse.sshfs user@host:/share rw\n`, |
244 | 245 | ); |
245 | 246 | |
246 | 247 | expect(() => |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。