test(cli): the owner removes every lock the words name, the HEAD lock too

A push to a bare folder repository locks HEAD as well as the branch when it
moves the branch HEAD names. Both locks are left when git is killed, and the
server names both. A newer git (Linux) goes on past a stale HEAD.lock, an older
one (macOS) refuses the push with "cannot lock ref 'HEAD'"; the test removed
only main.lock, so the last backup failed on macOS. The test now removes each
lock the report names (and asserts each is named), as the words tell the owner;
the program already reported both.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-21 12:44:36 -07:00
1 parent c30e381678
commit 91a654101d
1 file changed
+7 -2
+7 -2
View File
@@ -3735,8 +3735,13 @@ fn a_lock_a_kill_leaves_in_the_backup_folder_is_reported_and_never_removed_by_th
}
other => panic!("{other:?}"),
}
assert!(lock.exists(), "a later backup removed it");
std::fs::remove_file(&lock).unwrap();
assert!(
left.iter().all(|f| f.exists()),
"a later backup removed one of {left:?}"
);
for file in &left {
std::fs::remove_file(file).unwrap();
}
match home.admin(Request::BackUpNow {
id: A.into(),
new_disk: false,