From d53eb1ec7606a6e32b921b390ccb60230a1608df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Tue, 10 Nov 2026 18:30:25 +0100 Subject: [PATCH] test: show why a pre-migration dump failed in the retention test --- tests/integration/database-backup.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/integration/database-backup.test.ts b/tests/integration/database-backup.test.ts index 8e3ec5b76..d59df92e4 100644 --- a/tests/integration/database-backup.test.ts +++ b/tests/integration/database-backup.test.ts @@ -596,8 +596,10 @@ describe("the dump before migrating", () => { it("writes a checked dump with its manifest, and keeps the last two", async () => { for (let i = 0; i < 3; i++) { if (i > 0) await new Promise((r) => setTimeout(r, 1100)); - const { code } = await preMigration({ DB_BACKUP_DIR: preDir }); - expect(code).toBe(0); + const { code, errors } = await preMigration({ DB_BACKUP_DIR: preDir }); + // One shuffled nightly run saw a 1 here with the reason swallowed by + // the console spy; the message carries it next time. + expect(code, errors).toBe(0); } const names = readdirSync(preDir).sort(); expect(names).toHaveLength(4);