Skip to content

Commit

Permalink
remove unnecessary zstd for manifest_test
Browse files Browse the repository at this point in the history
  • Loading branch information
letFunny committed Aug 19, 2024
1 parent 8dfcd2b commit 4e0e33b
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions internal/manifest/manifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"slices"
"strings"

"github.com/klauspost/compress/zstd"
. "gopkg.in/check.v1"

"github.com/canonical/chisel/internal/manifest"
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit 4e0e33b

Please sign in to comment.