mirror of
https://github.com/Dasemu/Grove.git
synced 2026-11-26 23:36:11 +00:00
test(core): remove temp dirs after tests via shared RAII helper
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
09fbf79e87
commit
00226b4178
9 files changed
+115
-48
No files matched your search
@@ -73,8 +73,8 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn marker_lifecycle() {
|
||||
let d = std::env::temp_dir().join(format!("grove-busy-{}", std::process::id()));
|
||||
let _ = fs::remove_dir_all(&d);
|
||||
let tmp = crate::test_tmp::TempDir::new("busy");
|
||||
let d = tmp.path().join("d");
|
||||
assert_eq!(busy_state(&d), BusyState::Free);
|
||||
let g = BusyGuard::acquire(&d).unwrap();
|
||||
assert_eq!(busy_state(&d), BusyState::Active);
|
||||
|
||||
Reference in new issue
Block a user