diff options
Diffstat (limited to 'tvix/nix-compat/src/derivation/tests')
-rw-r--r-- | tvix/nix-compat/src/derivation/tests/mod.rs | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/tvix/nix-compat/src/derivation/tests/mod.rs b/tvix/nix-compat/src/derivation/tests/mod.rs index 7f94f5e690ce..d7b63a45ad9c 100644 --- a/tvix/nix-compat/src/derivation/tests/mod.rs +++ b/tvix/nix-compat/src/derivation/tests/mod.rs @@ -1,5 +1,6 @@ -use crate::derivation::output::{Hash, Output}; +use crate::derivation::output::Output; use crate::derivation::Derivation; +use crate::nixhash::NixHash; use crate::store_path::StorePath; use std::collections::BTreeSet; use std::fs::File; @@ -218,11 +219,15 @@ fn output_path_construction() { "out".to_string(), Output { path: "".to_string(), // will be calculated - hash: Some(Hash { - digest: "08813cbee9903c62be4c5027726a418a300da4500b2d369d3af9286f4815ceba" - .to_string(), - algo: "r:sha256".to_string(), - }), + hash_with_mode: Some(crate::nixhash::NixHashWithMode::Recursive(NixHash { + digest: data_encoding::HEXLOWER + .decode( + "08813cbee9903c62be4c5027726a418a300da4500b2d369d3af9286f4815ceba" + .as_bytes(), + ) + .unwrap(), + algo: crate::nixhash::HashAlgo::Sha256, + })), }, ); @@ -271,7 +276,7 @@ fn output_path_construction() { "out".to_string(), Output { path: "".to_string(), // will be calculated - hash: None, + hash_with_mode: None, }, ); |