From 4e0e33b13cd8319e31fb0a0c36587cfa479dfd7c Mon Sep 17 00:00:00 2001 From: Alberto Carretero Date: Mon, 19 Aug 2024 10:39:55 +0200 Subject: [PATCH] remove unnecessary zstd for manifest_test --- internal/manifest/manifest_test.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/internal/manifest/manifest_test.go b/internal/manifest/manifest_test.go index de0ad7eb..1da510da 100644 --- a/internal/manifest/manifest_test.go +++ b/internal/manifest/manifest_test.go @@ -6,7 +6,6 @@ import ( "slices" "strings" - "github.com/klauspost/compress/zstd" . "gopkg.in/check.v1" "github.com/canonical/chisel/internal/manifest" @@ -142,19 +141,13 @@ func (s *S) TestRun(c *C) { tmpDir := c.MkDir() manifestPath := path.Join(tmpDir, "manifest.wall") - f, err := os.OpenFile(manifestPath, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0644) - c.Assert(err, IsNil) - w, err := zstd.NewWriter(f) + w, err := os.OpenFile(manifestPath, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0644) c.Assert(err, IsNil) _, err = w.Write([]byte(test.input)) c.Assert(err, IsNil) w.Close() - f.Close() - file, err := os.OpenFile(manifestPath, os.O_RDONLY, 0644) - c.Assert(err, IsNil) - defer file.Close() - r, err := zstd.NewReader(file) + r, err := os.OpenFile(manifestPath, os.O_RDONLY, 0644) c.Assert(err, IsNil) defer r.Close()