From 6e1da519ca7d672c3cb0912ab641a7ce6b357b85 Mon Sep 17 00:00:00 2001 From: jack Date: Sun, 26 Jul 2026 13:34:06 +0200 Subject: [PATCH] Adapt invalid-receipt test to quarantine semantics after rebase The structurally invalid record is now quarantined aside on first lookup instead of staying in place globally fail-closed, so the test clears the .corrupt file before exercising journal validation alone. Co-Authored-By: Claude Opus 4.8 --- bitchatTests/Services/BLEPrivateMediaReceiptStoreTests.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bitchatTests/Services/BLEPrivateMediaReceiptStoreTests.swift b/bitchatTests/Services/BLEPrivateMediaReceiptStoreTests.swift index 8cef53c6..a443b856 100644 --- a/bitchatTests/Services/BLEPrivateMediaReceiptStoreTests.swift +++ b/bitchatTests/Services/BLEPrivateMediaReceiptStoreTests.swift @@ -224,7 +224,10 @@ struct BLEPrivateMediaReceiptStoreTests { ) #expect(FileManager.default.fileExists(atPath: victim.path)) - try FileManager.default.removeItem(at: receiptURL) + // The invalid record was quarantined aside, never executed. Clear it + // so the second phase exercises the journal validation on its own. + #expect(!FileManager.default.fileExists(atPath: receiptURL.path)) + try FileManager.default.removeItem(at: quarantinedRecord(in: root)) let journal = JournalFixture( version: 1, entries: [messageID: JournalEntryFixture(