From e29d38f8bfd9e7a1a99c26c1a12e4f475cb1b383 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Wed, 16 Oct 2024 21:11:24 +0200 Subject: [PATCH] dump/zip: test that files are compressed --- internal/dump/zip_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/dump/zip_test.go b/internal/dump/zip_test.go index 6f5f60f54..c6eb04206 100644 --- a/internal/dump/zip_test.go +++ b/internal/dump/zip_test.go @@ -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) } 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 { return fmt.Errorf("size does not match got %v want %v", f.UncompressedSize64, match.Size()) }