diff --git a/clients/filesystem-fuse/src/default_raw_filesystem.rs b/clients/filesystem-fuse/src/default_raw_filesystem.rs index 634d506d6df..7d3aee37968 100644 --- a/clients/filesystem-fuse/src/default_raw_filesystem.rs +++ b/clients/filesystem-fuse/src/default_raw_filesystem.rs @@ -431,8 +431,6 @@ impl FileEntryManager { #[cfg(test)] mod tests { use super::*; - use crate::filesystem::tests::TestRawFileSystem; - use crate::memory_filesystem::MemoryFileSystem; #[test] fn test_file_entry_manager() { @@ -452,17 +450,4 @@ mod tests { assert!(manager.get_file_entry_by_id(2).is_none()); assert!(manager.get_file_entry_by_path(Path::new("a/b")).is_none()); } - - #[tokio::test] - async fn test_default_raw_file_system() { - let memory_fs = MemoryFileSystem::new().await; - let raw_fs = DefaultRawFileSystem::new( - memory_fs, - &AppConfig::default(), - &FileSystemContext::default(), - ); - let _ = raw_fs.init().await; - let mut tester = TestRawFileSystem::new(raw_fs); - tester.test_raw_file_system().await; - } } diff --git a/clients/filesystem-fuse/src/memory_filesystem.rs b/clients/filesystem-fuse/src/memory_filesystem.rs index 1967e09fd4c..680e8442c1b 100644 --- a/clients/filesystem-fuse/src/memory_filesystem.rs +++ b/clients/filesystem-fuse/src/memory_filesystem.rs @@ -230,7 +230,10 @@ fn path_in_dir(dir: &Path, path: &Path) -> bool { #[cfg(test)] mod tests { use super::*; - use crate::filesystem::tests::TestPathFileSystem; + use crate::config::AppConfig; + use crate::default_raw_filesystem::DefaultRawFileSystem; + use crate::filesystem::tests::{TestPathFileSystem, TestRawFileSystem}; + use crate::filesystem::{FileSystemContext, RawFileSystem}; #[test] fn test_path_in_dir() { @@ -266,4 +269,17 @@ mod tests { let mut tester = TestPathFileSystem::new(fs); tester.test_path_file_system().await; } + + #[tokio::test] + async fn test_memory_file_system_with_raw_file_system() { + let memory_fs = MemoryFileSystem::new().await; + let raw_fs = DefaultRawFileSystem::new( + memory_fs, + &AppConfig::default(), + &FileSystemContext::default(), + ); + let _ = raw_fs.init().await; + let mut tester = TestRawFileSystem::new(raw_fs); + tester.test_raw_file_system().await; + } }