mirror of
https://github.com/restic/restic.git
synced 2024-12-22 15:57:07 +00:00
dump/zip: test that files are compressed
This commit is contained in:
parent
da3c02405b
commit
e29d38f8bf
1 changed files with 3 additions and 0 deletions
|
@ -101,6 +101,9 @@ func checkZip(t *testing.T, testDir string, srcZip *bytes.Buffer) error {
|
||||||
return fmt.Errorf("symlink target does not match, got %s want %s", string(linkName), target)
|
return fmt.Errorf("symlink target does not match, got %s want %s", string(linkName), target)
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
if f.Method != zip.Deflate {
|
||||||
|
return fmt.Errorf("expected compression method got %v want %v", f.Method, zip.Deflate)
|
||||||
|
}
|
||||||
if uint64(match.Size()) != f.UncompressedSize64 {
|
if uint64(match.Size()) != f.UncompressedSize64 {
|
||||||
return fmt.Errorf("size does not match got %v want %v", f.UncompressedSize64, match.Size())
|
return fmt.Errorf("size does not match got %v want %v", f.UncompressedSize64, match.Size())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue