From 0b56d9f21bb5a857ee17ecc539c173926441a3fb Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Thu, 29 Dec 2022 21:37:52 +0100 Subject: feat(src/proto): add PathInfo.validate() This provides validation of PathInfo messages, and ensures the output hashes are properly parsed from the root node names. NixPath already has a more extensive test suite for various wrong NixPaths, so it's omitted from here. Change-Id: I5d69118df5816daabb521ddb19d178bddd1caacf Reviewed-on: https://cl.tvl.fyi/c/depot/+/7684 Reviewed-by: tazjin Tested-by: BuildkiteCI --- tvix/store/src/tests/mod.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tvix/store/src/tests/mod.rs') diff --git a/tvix/store/src/tests/mod.rs b/tvix/store/src/tests/mod.rs index 366f96287a4c..b5fb0648e632 100644 --- a/tvix/store/src/tests/mod.rs +++ b/tvix/store/src/tests/mod.rs @@ -1,6 +1,8 @@ use crate::proto::{Directory, DirectoryNode, FileNode, SymlinkNode, ValidateDirectoryError}; use lazy_static::lazy_static; +mod pathinfo; + lazy_static! { static ref DUMMY_DIGEST: Vec = vec![ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -- cgit 1.4.1