From 3eaae99bb796ca5487d720947dcc73bd704c8467 Mon Sep 17 00:00:00 2001 From: hardfist Date: Mon, 30 Dec 2024 20:53:57 +0800 Subject: [PATCH] chore: fix test error --- crates/rspack_loader_runner/src/runner.rs | 8 ++++---- crates/rspack_storage/src/pack/strategy/split/util.rs | 2 +- crates/rspack_storage/tests/build.rs | 2 +- crates/rspack_storage/tests/dev.rs | 2 +- crates/rspack_storage/tests/error.rs | 2 +- crates/rspack_storage/tests/expire.rs | 2 +- crates/rspack_storage/tests/lock.rs | 4 ++-- crates/rspack_storage/tests/multi.rs | 2 +- crates/rspack_storage/tests/release.rs | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/crates/rspack_loader_runner/src/runner.rs b/crates/rspack_loader_runner/src/runner.rs index 0fc59fb404b1..7a712dbeec51 100644 --- a/crates/rspack_loader_runner/src/runner.rs +++ b/crates/rspack_loader_runner/src/runner.rs @@ -439,7 +439,7 @@ mod test { rs.clone(), Some(Arc::new(TestContentPlugin)), (), - Arc::new(NativeFileSystem {}) + Arc::new(NativeFileSystem::new(false)) ) .await .err() @@ -457,7 +457,7 @@ mod test { rs.clone(), Some(Arc::new(TestContentPlugin)), (), - Arc::new(NativeFileSystem {}) + Arc::new(NativeFileSystem::new(false)) ) .await .err() @@ -541,7 +541,7 @@ mod test { rs, Some(Arc::new(TestContentPlugin)), (), - Arc::new(NativeFileSystem {}), + Arc::new(NativeFileSystem::new(false)), ) .await .unwrap(); @@ -608,7 +608,7 @@ mod test { rs, Some(Arc::new(TestContentPlugin)), (), - Arc::new(NativeFileSystem {}) + Arc::new(NativeFileSystem::new(false)) ) .await .err() diff --git a/crates/rspack_storage/src/pack/strategy/split/util.rs b/crates/rspack_storage/src/pack/strategy/split/util.rs index 726dd899a7d2..01bfc93d2511 100644 --- a/crates/rspack_storage/src/pack/strategy/split/util.rs +++ b/crates/rspack_storage/src/pack/strategy/split/util.rs @@ -284,7 +284,7 @@ pub mod test_pack_utils { get_memory_path(case), ), ( - Arc::new(BridgeFileSystem(Arc::new(NativeFileSystem {}))), + Arc::new(BridgeFileSystem(Arc::new(NativeFileSystem::new(false)))), get_native_path(case), ), ]; diff --git a/crates/rspack_storage/tests/build.rs b/crates/rspack_storage/tests/build.rs index 05b0eae8f0b0..2a67d9dd5c10 100644 --- a/crates/rspack_storage/tests/build.rs +++ b/crates/rspack_storage/tests/build.rs @@ -114,7 +114,7 @@ mod test_storage_build { let cases = [ ( get_native_path("test_build_native"), - Arc::new(BridgeFileSystem(Arc::new(NativeFileSystem {}))), + Arc::new(BridgeFileSystem(Arc::new(NativeFileSystem::new(false)))), ), ( get_memory_path("test_build_memory"), diff --git a/crates/rspack_storage/tests/dev.rs b/crates/rspack_storage/tests/dev.rs index 219e7f2421e2..b52f09a99300 100644 --- a/crates/rspack_storage/tests/dev.rs +++ b/crates/rspack_storage/tests/dev.rs @@ -149,7 +149,7 @@ mod test_storage_dev { let cases = [ ( get_native_path("test_dev_native"), - Arc::new(BridgeFileSystem(Arc::new(NativeFileSystem {}))), + Arc::new(BridgeFileSystem(Arc::new(NativeFileSystem::new(false)))), ), ( get_memory_path("test_dev_memory"), diff --git a/crates/rspack_storage/tests/error.rs b/crates/rspack_storage/tests/error.rs index 123425eb6a60..7be5469e1479 100644 --- a/crates/rspack_storage/tests/error.rs +++ b/crates/rspack_storage/tests/error.rs @@ -162,7 +162,7 @@ mod test_storage_error { let cases = [ ( get_native_path("test_error_native"), - Arc::new(BridgeFileSystem(Arc::new(NativeFileSystem {}))), + Arc::new(BridgeFileSystem(Arc::new(NativeFileSystem::new(false)))), ), ( get_memory_path("test_error_memory"), diff --git a/crates/rspack_storage/tests/expire.rs b/crates/rspack_storage/tests/expire.rs index bb1b2ae32b50..8eadac6d9566 100644 --- a/crates/rspack_storage/tests/expire.rs +++ b/crates/rspack_storage/tests/expire.rs @@ -131,7 +131,7 @@ mod test_storage_expire { let cases = [ ( get_native_path("test_expire_native"), - Arc::new(BridgeFileSystem(Arc::new(NativeFileSystem {}))), + Arc::new(BridgeFileSystem(Arc::new(NativeFileSystem::new(false)))), ), ( get_memory_path("test_expire_memory"), diff --git a/crates/rspack_storage/tests/lock.rs b/crates/rspack_storage/tests/lock.rs index 29bbf61c5adb..d785cc8edd78 100644 --- a/crates/rspack_storage/tests/lock.rs +++ b/crates/rspack_storage/tests/lock.rs @@ -174,7 +174,7 @@ mod test_storage_lock { let cases = [ ( get_native_path("test_lock_native"), - Arc::new(BridgeFileSystem(Arc::new(NativeFileSystem {}))), + Arc::new(BridgeFileSystem(Arc::new(NativeFileSystem::new(false)))), ), ( get_memory_path("test_lock_memory"), @@ -224,7 +224,7 @@ mod test_storage_lock { let cases = [ ( get_native_path("test_lock_fail_native"), - Arc::new(BridgeFileSystem(Arc::new(NativeFileSystem {}))), + Arc::new(BridgeFileSystem(Arc::new(NativeFileSystem::new(false)))), ), ( get_memory_path("test_lock_fail_memory"), diff --git a/crates/rspack_storage/tests/multi.rs b/crates/rspack_storage/tests/multi.rs index 8e5b46cb9ff4..1b68fcface43 100644 --- a/crates/rspack_storage/tests/multi.rs +++ b/crates/rspack_storage/tests/multi.rs @@ -159,7 +159,7 @@ mod test_storage_multi { let cases = [ ( get_native_path("test_multi_native"), - Arc::new(BridgeFileSystem(Arc::new(NativeFileSystem {}))), + Arc::new(BridgeFileSystem(Arc::new(NativeFileSystem::new(false)))), ), ( get_memory_path("test_multi_memory"), diff --git a/crates/rspack_storage/tests/release.rs b/crates/rspack_storage/tests/release.rs index 9a9d20186501..7e76c33309c6 100644 --- a/crates/rspack_storage/tests/release.rs +++ b/crates/rspack_storage/tests/release.rs @@ -199,7 +199,7 @@ mod test_storage_release { let cases = [ ( get_native_path("test_release_native"), - Arc::new(BridgeFileSystem(Arc::new(NativeFileSystem {}))), + Arc::new(BridgeFileSystem(Arc::new(NativeFileSystem::new(false)))), ), ( get_memory_path("test_release_memory"),