about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-02-12T11·50+0100
committerflokli <flokli@flokli.de>2023-03-10T10·58+0000
commit80f68bf8282a4607a9e8f748a0aaa830d6aeacb7 (patch)
treeb7d25759fc64593dd08d91ade1dfec127a798b2b
parent60abca1d8eef44b692694c82cdb3da15eab5b0a4 (diff)
chore(tvix/store): move protos into separate mod.rs r/5907
This allows adding more stuff into this namespace, from different files.

Also move tests on proto-related code from src/tests to src/proto/tests.

Change-Id: I49e066fce90efbc18e16d68f94497b32ed5625c0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8091
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
-rw-r--r--tvix/store/src/proto/mod.rs (renamed from tvix/store/src/proto.rs)3
-rw-r--r--tvix/store/src/proto/tests/directory.rs (renamed from tvix/store/src/tests/directory.rs)0
-rw-r--r--tvix/store/src/proto/tests/directory_nodes_iterator.rs (renamed from tvix/store/src/tests/directory_nodes_iterator.rs)0
-rw-r--r--tvix/store/src/proto/tests/mod.rs3
-rw-r--r--tvix/store/src/proto/tests/pathinfo.rs (renamed from tvix/store/src/tests/pathinfo.rs)0
-rw-r--r--tvix/store/src/tests/mod.rs3
6 files changed, 6 insertions, 3 deletions
diff --git a/tvix/store/src/proto.rs b/tvix/store/src/proto/mod.rs
index 0ca3af321c86..12a6bbae907b 100644
--- a/tvix/store/src/proto.rs
+++ b/tvix/store/src/proto/mod.rs
@@ -15,6 +15,9 @@ tonic::include_proto!("tvix.store.v1");
 /// [`tonic_reflection`](https://docs.rs/tonic-reflection).
 pub const FILE_DESCRIPTOR_SET: &[u8] = tonic::include_file_descriptor_set!("tvix.store.v1");
 
+#[cfg(test)]
+mod tests;
+
 /// Errors that can occur during the validation of Directory messages.
 #[derive(Debug, PartialEq, Eq, Error)]
 pub enum ValidateDirectoryError {
diff --git a/tvix/store/src/tests/directory.rs b/tvix/store/src/proto/tests/directory.rs
index 890cb2164ad5..890cb2164ad5 100644
--- a/tvix/store/src/tests/directory.rs
+++ b/tvix/store/src/proto/tests/directory.rs
diff --git a/tvix/store/src/tests/directory_nodes_iterator.rs b/tvix/store/src/proto/tests/directory_nodes_iterator.rs
index 8f591f0560ce..8f591f0560ce 100644
--- a/tvix/store/src/tests/directory_nodes_iterator.rs
+++ b/tvix/store/src/proto/tests/directory_nodes_iterator.rs
diff --git a/tvix/store/src/proto/tests/mod.rs b/tvix/store/src/proto/tests/mod.rs
new file mode 100644
index 000000000000..04631afe405a
--- /dev/null
+++ b/tvix/store/src/proto/tests/mod.rs
@@ -0,0 +1,3 @@
+mod directory;
+mod directory_nodes_iterator;
+mod pathinfo;
diff --git a/tvix/store/src/tests/pathinfo.rs b/tvix/store/src/proto/tests/pathinfo.rs
index 35a2771c300a..35a2771c300a 100644
--- a/tvix/store/src/tests/pathinfo.rs
+++ b/tvix/store/src/proto/tests/pathinfo.rs
diff --git a/tvix/store/src/tests/mod.rs b/tvix/store/src/tests/mod.rs
index 57ae1df9f6ff..b945763f3686 100644
--- a/tvix/store/src/tests/mod.rs
+++ b/tvix/store/src/tests/mod.rs
@@ -1,6 +1,3 @@
-mod directory;
-mod directory_nodes_iterator;
 mod directory_service;
 mod nar;
 mod path_info_service;
-mod pathinfo;