about summary refs log tree commit diff
path: root/tvix/store/src/tests/fixtures.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/tests/fixtures.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/tests/fixtures.rs')
-rw-r--r--tvix/store/src/tests/fixtures.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/tvix/store/src/tests/fixtures.rs b/tvix/store/src/tests/fixtures.rs
index 7c72d71c6d..233f985915 100644
--- a/tvix/store/src/tests/fixtures.rs
+++ b/tvix/store/src/tests/fixtures.rs
@@ -5,11 +5,9 @@ use tvix_castore::proto as castorepb;
 use crate::proto::{nar_info::ca, nar_info::Ca, NarInfo, PathInfo};
 
 pub const DUMMY_NAME: &str = "00000000000000000000000000000000-dummy";
+pub const DUMMY_OUTPUT_HASH: [u8; 20] = [0; 20];
 
 lazy_static! {
-    // output hash
-    pub static ref DUMMY_OUTPUT_HASH: bytes::Bytes = vec![0; 20].into();
-
     /// The NAR representation of a symlink pointing to `/nix/store/somewhereelse`
     pub static ref NAR_CONTENTS_SYMLINK: Vec<u8> = vec![
         13, 0, 0, 0, 0, 0, 0, 0, b'n', b'i', b'x', b'-', b'a', b'r', b'c', b'h', b'i', b'v', b'e', b'-', b'1', 0,
@@ -104,7 +102,7 @@ lazy_static! {
                 size: 0,
             })),
         }),
-        references: vec![DUMMY_OUTPUT_HASH.clone()],
+        references: vec![DUMMY_OUTPUT_HASH.as_slice().into()],
         narinfo: None,
     };