about summary refs log tree commit diff
path: root/tvix/store/src/proto/tests/grpc_pathinfoservice.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-03-27T11·22+0100
committerflokli <flokli@flokli.de>2024-03-28T07·02+0000
commit93dc5df957129b48e95c92c5c31bca3da5488208 (patch)
treeb85c05f185ebe3178f71a53aaed706737ae228b2 /tvix/store/src/proto/tests/grpc_pathinfoservice.rs
parentbfc5b209a68d8668939bc20b89b9ecd7dd6b6b6d (diff)
refactor(tvix/store/tests/fixtures): use [u8; 20] r/7787
This makes the fixture more use-able when interacting with the trait,
the Bytes are only useful for the gRPC version.

Change-Id: Iaaea1adc6df18491f236a28c4343f5b4ee5fcfd3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11271
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/store/src/proto/tests/grpc_pathinfoservice.rs')
-rw-r--r--tvix/store/src/proto/tests/grpc_pathinfoservice.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/tvix/store/src/proto/tests/grpc_pathinfoservice.rs b/tvix/store/src/proto/tests/grpc_pathinfoservice.rs
index 8016b9901d96..df74861bc7b4 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;