about summary refs log tree commit diff
path: root/tvix/store/src/proto/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/store/src/proto/tests')
-rw-r--r--tvix/store/src/proto/tests/grpc_pathinfoservice.rs5
-rw-r--r--tvix/store/src/proto/tests/pathinfo.rs6
2 files changed, 6 insertions, 5 deletions
diff --git a/tvix/store/src/proto/tests/grpc_pathinfoservice.rs b/tvix/store/src/proto/tests/grpc_pathinfoservice.rs
index 8016b9901d..df74861bc7 100644
--- a/tvix/store/src/proto/tests/grpc_pathinfoservice.rs
+++ b/tvix/store/src/proto/tests/grpc_pathinfoservice.rs
@@ -7,6 +7,7 @@ use crate::tests::fixtures::DUMMY_OUTPUT_HASH;
 use crate::tests::utils::gen_blob_service;
 use crate::tests::utils::gen_directory_service;
 use crate::tests::utils::gen_pathinfo_service;
+use bytes::Bytes;
 use futures::stream::BoxStream;
 use std::sync::Arc;
 use tonic::Request;
@@ -35,7 +36,7 @@ async fn not_found() {
 
     let resp = service
         .get(Request::new(GetPathInfoRequest {
-            by_what: Some(ByOutputHash(DUMMY_OUTPUT_HASH.clone())),
+            by_what: Some(ByOutputHash(Bytes::from(DUMMY_OUTPUT_HASH.to_vec()))),
         }))
         .await;
 
@@ -65,7 +66,7 @@ async fn put_get() {
 
     let resp = service
         .get(Request::new(GetPathInfoRequest {
-            by_what: Some(ByOutputHash(DUMMY_OUTPUT_HASH.clone())),
+            by_what: Some(ByOutputHash(Bytes::from(DUMMY_OUTPUT_HASH.to_vec()))),
         }))
         .await;
 
diff --git a/tvix/store/src/proto/tests/pathinfo.rs b/tvix/store/src/proto/tests/pathinfo.rs
index 7c1b69c2a3..dca74dc92f 100644
--- a/tvix/store/src/proto/tests/pathinfo.rs
+++ b/tvix/store/src/proto/tests/pathinfo.rs
@@ -235,8 +235,8 @@ fn validate_inconsistent_narinfo_reference_name_digest() {
 
     match path_info.validate().expect_err("must fail") {
         ValidatePathInfoError::InconsistentNarinfoReferenceNameDigest(0, e_expected, e_actual) => {
-            assert_eq!(path_info.references[0][..], e_expected);
-            assert_eq!(DUMMY_OUTPUT_HASH[..], e_actual);
+            assert_eq!(path_info.references[0][..], e_expected[..]);
+            assert_eq!(DUMMY_OUTPUT_HASH, e_actual);
         }
         e => panic!("unexpected error: {:?}", e),
     }
@@ -274,7 +274,7 @@ fn validate_valid_deriver() {
     let narinfo = path_info.narinfo.as_mut().unwrap();
     narinfo.deriver = Some(crate::proto::StorePath {
         name: "foo".to_string(),
-        digest: DUMMY_OUTPUT_HASH.clone(),
+        digest: Bytes::from(DUMMY_OUTPUT_HASH.as_slice()),
     });
 
     path_info.validate().expect("must validate");