about summary refs log tree commit diff
path: root/tvix/store/src/proto/tests/pathinfo.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-10-17T22·27+0100
committerclbot <clbot@tvl.fyi>2023-10-22T17·04+0000
commit9118dc8a5056ad0cdb91a0688f50ac5d6e28a1ec (patch)
tree5d705773016676896bfe35a2da17581ba4827e61 /tvix/store/src/proto/tests/pathinfo.rs
parentba9a62ca9f82f00aec1b8ad163252476cbb5322a (diff)
refactor(tvix/store): move deriver field into narinfo submessage r/6869
This information is present in the .narinfo files, it should have gone
there.

Change-Id: Ib43d0cf30c2795bf1fe77c46646174353ade0458
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9794
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/store/src/proto/tests/pathinfo.rs')
-rw-r--r--tvix/store/src/proto/tests/pathinfo.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/tvix/store/src/proto/tests/pathinfo.rs b/tvix/store/src/proto/tests/pathinfo.rs
index 03094ed734ce..392d5d8127b4 100644
--- a/tvix/store/src/proto/tests/pathinfo.rs
+++ b/tvix/store/src/proto/tests/pathinfo.rs
@@ -266,10 +266,11 @@ fn validate_symlink_target_null_byte_invalid() {
 /// Create a PathInfo with a correct deriver field and ensure it succeeds.
 #[test]
 fn validate_valid_deriver() {
-    let mut path_info = PATH_INFO_WITHOUT_NARINFO.clone();
+    let mut path_info = PATH_INFO_WITH_NARINFO.clone();
 
     // add a valid deriver
-    path_info.deriver = Some(crate::proto::StorePath {
+    let narinfo = path_info.narinfo.as_mut().unwrap();
+    narinfo.deriver = Some(crate::proto::StorePath {
         name: "foo".to_string(),
         digest: DUMMY_OUTPUT_HASH.clone(),
     });
@@ -280,10 +281,11 @@ fn validate_valid_deriver() {
 /// Create a PathInfo with a broken deriver field and ensure it fails.
 #[test]
 fn validate_invalid_deriver() {
-    let mut path_info = PATH_INFO_WITHOUT_NARINFO.clone();
+    let mut path_info = PATH_INFO_WITH_NARINFO.clone();
 
     // add a broken deriver (invalid digest)
-    path_info.deriver = Some(crate::proto::StorePath {
+    let narinfo = path_info.narinfo.as_mut().unwrap();
+    narinfo.deriver = Some(crate::proto::StorePath {
         name: "foo".to_string(),
         digest: vec![].into(),
     });