diff options
author | Florian Klink <flokli@flokli.de> | 2024-03-27T11·22+0100 |
---|---|---|
committer | flokli <flokli@flokli.de> | 2024-03-28T07·02+0000 |
commit | 93dc5df957129b48e95c92c5c31bca3da5488208 (patch) | |
tree | b85c05f185ebe3178f71a53aaed706737ae228b2 /tvix/store/src/proto/tests/pathinfo.rs | |
parent | bfc5b209a68d8668939bc20b89b9ecd7dd6b6b6d (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/pathinfo.rs')
-rw-r--r-- | tvix/store/src/proto/tests/pathinfo.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tvix/store/src/proto/tests/pathinfo.rs b/tvix/store/src/proto/tests/pathinfo.rs index 7c1b69c2a376..dca74dc92fd5 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"); |