diff --git a/tvix/store/src/tests/nar_renderer.rs b/tvix/store/src/tests/nar_renderer.rs index b57b58ec5..b92739552 100644 --- a/tvix/store/src/tests/nar_renderer.rs +++ b/tvix/store/src/tests/nar_renderer.rs @@ -5,9 +5,7 @@ use crate::tests::utils::*; use sha2::{Digest, Sha256}; use std::io; use tokio::io::sink; -use tvix_castore::proto::DirectoryNode; -use tvix_castore::proto::FileNode; -use tvix_castore::proto::{self as castorepb, SymlinkNode}; +use tvix_castore::proto as castorepb; #[tokio::test] async fn single_symlink() { @@ -15,7 +13,7 @@ async fn single_symlink() { write_nar( &mut buf, - &castorepb::node::Node::Symlink(SymlinkNode { + &castorepb::node::Node::Symlink(castorepb::SymlinkNode { name: "doesntmatter".into(), target: "/nix/store/somewhereelse".into(), }), @@ -34,7 +32,7 @@ async fn single_symlink() { async fn single_file_missing_blob() { let e = write_nar( sink(), - &castorepb::node::Node::File(FileNode { + &castorepb::node::Node::File(castorepb::FileNode { name: "doesntmatter".into(), digest: HELLOWORLD_BLOB_DIGEST.clone().into(), size: HELLOWORLD_BLOB_CONTENTS.len() as u64, @@ -79,7 +77,7 @@ async fn single_file_wrong_blob_size() { { let e = write_nar( sink(), - &castorepb::node::Node::File(FileNode { + &castorepb::node::Node::File(castorepb::FileNode { name: "doesntmatter".into(), digest: HELLOWORLD_BLOB_DIGEST.clone().into(), size: 42, // <- note the wrong size here! @@ -104,7 +102,7 @@ async fn single_file_wrong_blob_size() { { let e = write_nar( sink(), - &castorepb::node::Node::File(FileNode { + &castorepb::node::Node::File(castorepb::FileNode { name: "doesntmatter".into(), digest: HELLOWORLD_BLOB_DIGEST.clone().into(), size: 2, // <- note the wrong size here! @@ -147,7 +145,7 @@ async fn single_file() { write_nar( &mut buf, - &castorepb::node::Node::File(FileNode { + &castorepb::node::Node::File(castorepb::FileNode { name: "doesntmatter".into(), digest: HELLOWORLD_BLOB_DIGEST.clone().into(), size: HELLOWORLD_BLOB_CONTENTS.len() as u64, @@ -194,7 +192,7 @@ async fn test_complicated() { write_nar( &mut buf, - &castorepb::node::Node::Directory(DirectoryNode { + &castorepb::node::Node::Directory(castorepb::DirectoryNode { name: "doesntmatter".into(), digest: DIRECTORY_COMPLICATED.digest().into(), size: DIRECTORY_COMPLICATED.size(), @@ -211,7 +209,7 @@ async fn test_complicated() { let bs = blob_service.clone(); let ds = directory_service.clone(); let (nar_size, nar_digest) = calculate_size_and_sha256( - &castorepb::node::Node::Directory(DirectoryNode { + &castorepb::node::Node::Directory(castorepb::DirectoryNode { name: "doesntmatter".into(), digest: DIRECTORY_COMPLICATED.digest().into(), size: DIRECTORY_COMPLICATED.size(),