mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-26 21:05:18 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -224,7 +224,10 @@ struct BLEPrivateMediaReceiptStoreTests {
|
|||||||
)
|
)
|
||||||
#expect(FileManager.default.fileExists(atPath: victim.path))
|
#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(
|
let journal = JournalFixture(
|
||||||
version: 1,
|
version: 1,
|
||||||
entries: [messageID: JournalEntryFixture(
|
entries: [messageID: JournalEntryFixture(
|
||||||
|
|||||||
Reference in New Issue
Block a user