From d0dda0eda44be9917f13597cfdee84bec7d1f449 Mon Sep 17 00:00:00 2001 From: Christian Ebner Date: Wed, 12 Jun 2024 15:17:11 +0200 Subject: [PATCH] tests: adapt tests to decoder interface changes The `Decoder`s `contents` method call can fail because of an added consistency check when using split variant inputs. Therefore, the additional error has to be handled by the callers. Signed-off-by: Christian Ebner --- tests/compat.rs | 1 + tests/simple/fs.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/compat.rs b/tests/compat.rs index 8f1b778..c9e681a 100644 --- a/tests/compat.rs +++ b/tests/compat.rs @@ -125,6 +125,7 @@ fn test_archive() { let mut content = Vec::new(); decoder .contents() + .expect("failed to get contents from decoder") .expect("failed to get contents for file entry") .read_to_end(&mut content) .expect("failed to read test file contents"); diff --git a/tests/simple/fs.rs b/tests/simple/fs.rs index 96fcee9..39d1294 100644 --- a/tests/simple/fs.rs +++ b/tests/simple/fs.rs @@ -235,7 +235,7 @@ impl Entry { PxarEntryKind::File { size, .. } => { let mut data = Vec::new(); decoder - .contents() + .contents()? .ok_or_else(|| { format_err!("failed to get contents for file entry: {:?}", item.path()) })?