about summary refs log tree commit diff
path: root/tvix/store/src/tests/utils.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/store/src/tests/utils.rs')
-rw-r--r--tvix/store/src/tests/utils.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tvix/store/src/tests/utils.rs b/tvix/store/src/tests/utils.rs
new file mode 100644
index 000000000000..2991feed41db
--- /dev/null
+++ b/tvix/store/src/tests/utils.rs
@@ -0,0 +1,17 @@
+use crate::{
+    blobservice::{BlobService, MemoryBlobService},
+    directoryservice::{DirectoryService, MemoryDirectoryService},
+    pathinfoservice::{MemoryPathInfoService, PathInfoService},
+};
+
+pub fn gen_blob_service() -> impl BlobService + Send + Sync + Clone + 'static {
+    MemoryBlobService::default()
+}
+
+pub fn gen_directory_service() -> impl DirectoryService + Send + Sync + Clone + 'static {
+    MemoryDirectoryService::default()
+}
+
+pub fn gen_pathinfo_service() -> impl PathInfoService {
+    MemoryPathInfoService::default()
+}