mirror of
https://git.proxmox.com/git/pxar
synced 2025-04-28 16:11:22 +00:00
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 <c.ebner@proxmox.com>
This commit is contained in:
parent
10645277ed
commit
d0dda0eda4
@ -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");
|
||||
|
@ -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())
|
||||
})?
|
||||
|
Loading…
Reference in New Issue
Block a user