Release v2.0.0
CI / Windows baseline (push) Canceled after 0s

This commit is contained in:
2026-09-11 18:29:33 +03:00
parent c5532f2087
commit c6b66a4ed7
8 changed files with 192 additions and 19 deletions
@@ -38,6 +38,26 @@ fn interrupted_commit_restores_primary_and_backup_before_next_read() {
assert!(fixture.storage.read_profiles().unwrap().is_empty());
}
#[test]
fn rollback_leaves_unchanged_files_in_place() {
let fixture = Fixture::new();
let path = &fixture.storage.paths().profiles_file;
let transaction = ConfigurationTransaction::begin(&fixture.storage, None).unwrap();
// Deny replacement on Windows, while allowing the recovery code to read.
let mut options = fs::OpenOptions::new();
options.read(true);
#[cfg(windows)]
{
use std::os::windows::fs::OpenOptionsExt;
options.share_mode(1);
}
let held = options.open(path).unwrap();
let modified = held.metadata().unwrap().modified().unwrap();
transaction.abort().unwrap();
assert_eq!(fs::metadata(path).unwrap().modified().unwrap(), modified);
assert!(read_guard(&fixture.storage).is_ok());
}
#[test]
fn shared_lock_rejects_second_writer_and_reader() {
let fixture = Fixture::new();