mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 02:51:08 +00:00
PVF: Fix unshare "no such file or directory" error (#2426)
This commit is contained in:
@@ -499,8 +499,7 @@ mod tests {
|
||||
|
||||
#[tokio::test]
|
||||
async fn remove_stale_cache_on_startup() {
|
||||
let cache_dir = crate::worker_intf::tmppath("test-cache").await.unwrap();
|
||||
fs::create_dir_all(&cache_dir).unwrap();
|
||||
let cache_dir = tempfile::Builder::new().prefix("test-cache-").tempdir().unwrap();
|
||||
|
||||
// invalid prefix
|
||||
create_rand_artifact(&cache_dir, "");
|
||||
@@ -529,7 +528,7 @@ mod tests {
|
||||
|
||||
assert_eq!(fs::read_dir(&cache_dir).unwrap().count(), 7);
|
||||
|
||||
let artifacts = Artifacts::new_and_prune(&cache_dir).await;
|
||||
let artifacts = Artifacts::new_and_prune(cache_dir.path()).await;
|
||||
|
||||
assert_eq!(fs::read_dir(&cache_dir).unwrap().count(), 1);
|
||||
assert_eq!(artifacts.len(), 1);
|
||||
|
||||
Reference in New Issue
Block a user