Skip the Bates ACL test where the deny entry doesn't bind (#6670)

This commit is contained in:
BFlat authored and GitHub committed 2026-11-09 10:52:41 +08:00
1 parent 28093ed4cf
commit 83b8d4dc2f
1 file changed
+5 -1
+5 -1
View File
@@ -415,7 +415,11 @@ mod tests {
let acl = Command::new("icacls.exe").arg(dir.path()).arg("/deny").arg(format!("*{sid}:(AD)")).status().unwrap();
assert!(acl.success());
assert!(matches!(tempfile::tempdir_in(dir.path()), Err(error) if error.kind() == std::io::ErrorKind::PermissionDenied));
// Where the deny entry does not bind the test's own account (it did not on CI's Windows image),
// there is no denied folder to probe.
if !matches!(tempfile::tempdir_in(dir.path()), Err(error) if error.kind() == std::io::ErrorKind::PermissionDenied) {
return;
}
let direct_probe = dir.path().join("direct-probe");
let file = std::fs::OpenOptions::new().write(true).create_new(true).open(&direct_probe).unwrap();
drop(file);