test(core): skip the locked-rollback test where permissions are not enforced

Root ignores directory permissions, so the partial-rollback case cannot be set
up there (cloud containers run tests as root).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011GZUAGhGYoiLvmfXweQnDY
This commit is contained in:
Claude committed 2026-11-25 04:56:36 +00:00
1 parent f201611510
commit 39d241ee2b
1 file changed
+7
+7
View File
@@ -225,6 +225,13 @@ mod tests {
fs::write(locked.join("f"), "x").unwrap();
fs::write(d.join(crate::busy::BUSY), "1 1\n").unwrap();
fs::set_permissions(&locked, fs::Permissions::from_mode(0o500)).unwrap();
// Root (e.g. a CI container) ignores directory permissions, so nothing can be locked
// and the partial-rollback path is unreachable: the test has nothing to check there.
if fs::write(locked.join("probe"), "x").is_ok() {
eprintln!("skipped: directory permissions are not enforced (running as root?)");
fs::set_permissions(&locked, fs::Permissions::from_mode(0o700)).unwrap();
return;
}
rollback_clone(&d);
assert!(d.join(".grove-stage").exists());
assert!(