mirror of
https://github.com/Dasemu/Grove.git
synced 2026-11-26 15:26:09 +00:00
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:
1 file changed
+7
@@ -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!(
|
||||
|
||||
Reference in new issue
Block a user