Core tests make a throwaway blob store with blobs::scratch

blobs, store and portable each built a BlobStore in a temp directory their own
way: pid+tag twice, a uuid once. blobs::scratch(tag) is that, with a counter, so
two tests can never share a directory even if they pick the same tag. The
desktop's and ffi's temp-dir helpers stay, one per crate: sharing them would
need a test-util feature on the core crate.

DRY pass #2, batch 2, F9 (#5372).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 14:24:52 -04:00
co-authored by Claude Opus 5.5
parent 3ea7c817bf
commit 2dec89bf8c
3 changed files with 24 additions and 25 deletions
+2 -2
View File
@@ -596,8 +596,8 @@ mod tests {
fn store() -> (Connection, BlobStore, std::path::PathBuf) {
let conn = crate::local::memory_conn().unwrap();
let dir = std::env::temp_dir().join(format!("inkwell-portable-{}", uuid::Uuid::new_v4()));
let blobs = BlobStore::new(dir.clone()).unwrap();
let blobs = crate::sync::blobs::scratch("portable");
let dir = blobs.root().to_path_buf();
(conn, blobs, dir)
}