Merge branch 'restore-ledger-store-coverage': tests for the backup code bring the store back over its coverage floor (92.71% against 92.58%)
check / check (cli) (push) Blocked by required conditions
check / check (gui-tests) (push) Blocked by required conditions
check / check (gui-unit) (push) Blocked by required conditions
check / check (lint) (push) Blocked by required conditions
check / check (rest) (push) Blocked by required conditions
portable-macos / portable (macos-latest) (push) Waiting to run
portable-windows / portable (windows-latest) (push) Waiting to run
two-user / two-user (push) Waiting to run

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Opus 5.5 committed 2026-12-02 14:19:20 -07:00
commit a5b910c4e1
2 files changed
+1871

No files matched your search

+20
View File
@@ -277,3 +277,23 @@ fn a_destination_of_thousands_of_backups_stays_small_and_quick_to_read() {
assert_eq!(m.journal.segments.len() as u64, n);
}
}
#[test]
fn a_backup_error_carried_through_an_io_error_keeps_its_words() {
use super::io::{carry, uncarry};
// A stop or a death has to cross an io callback to be told (the fill
// of a put, the read of a piece); the words it was given are the
// words that come back, so a stopped backup is said as stopped
// (WB-backup-9), and the disk's own error is told as the disk's own.
let carried = carry(super::BackupError::Cancelled("backing up".into()));
let words = carried.to_string();
assert!(words.contains("backing up was stopped"), "{words}");
assert_eq!(
uncarry(carried),
super::BackupError::Cancelled("backing up".into())
);
assert_eq!(
uncarry(std::io::Error::from(std::io::ErrorKind::NotFound)),
super::BackupError::Io(std::io::ErrorKind::NotFound)
);
}
File diff suppressed because it is too large. Load diff