From 621739037fe5cb5fd521851a76ca73812da59e85 Mon Sep 17 00:00:00 2001 From: edef Date: Fri, 27 Oct 2023 12:44:22 +0000 Subject: feat(tvix/castore): carry name in ValidateNodeError::InvalidName Change-Id: Ica288e94f3f6025d98ef7d56dc5d6f874ec921b7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9861 Tested-by: BuildkiteCI Reviewed-by: flokli --- tvix/castore/src/proto/tests/directory.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tvix/castore/src/proto/tests/directory.rs') diff --git a/tvix/castore/src/proto/tests/directory.rs b/tvix/castore/src/proto/tests/directory.rs index 0464a268292c..f2295740f25e 100644 --- a/tvix/castore/src/proto/tests/directory.rs +++ b/tvix/castore/src/proto/tests/directory.rs @@ -165,7 +165,7 @@ fn validate_invalid_names() { ..Default::default() }; match d.validate().expect_err("must fail") { - ValidateDirectoryError::InvalidNode(n, ValidateNodeError::InvalidName) => { + ValidateDirectoryError::InvalidNode(n, ValidateNodeError::InvalidName(_)) => { assert_eq!(n, b"") } _ => panic!("unexpected error"), @@ -182,7 +182,7 @@ fn validate_invalid_names() { ..Default::default() }; match d.validate().expect_err("must fail") { - ValidateDirectoryError::InvalidNode(n, ValidateNodeError::InvalidName) => { + ValidateDirectoryError::InvalidNode(n, ValidateNodeError::InvalidName(_)) => { assert_eq!(n, b".") } _ => panic!("unexpected error"), @@ -200,7 +200,7 @@ fn validate_invalid_names() { ..Default::default() }; match d.validate().expect_err("must fail") { - ValidateDirectoryError::InvalidNode(n, ValidateNodeError::InvalidName) => { + ValidateDirectoryError::InvalidNode(n, ValidateNodeError::InvalidName(_)) => { assert_eq!(n, b"..") } _ => panic!("unexpected error"), @@ -216,7 +216,7 @@ fn validate_invalid_names() { ..Default::default() }; match d.validate().expect_err("must fail") { - ValidateDirectoryError::InvalidNode(n, ValidateNodeError::InvalidName) => { + ValidateDirectoryError::InvalidNode(n, ValidateNodeError::InvalidName(_)) => { assert_eq!(n, b"\x00") } _ => panic!("unexpected error"), @@ -232,7 +232,7 @@ fn validate_invalid_names() { ..Default::default() }; match d.validate().expect_err("must fail") { - ValidateDirectoryError::InvalidNode(n, ValidateNodeError::InvalidName) => { + ValidateDirectoryError::InvalidNode(n, ValidateNodeError::InvalidName(_)) => { assert_eq!(n, b"foo/bar") } _ => panic!("unexpected error"), -- cgit 1.4.1