Skip to content

Commit

Permalink
Move testdata/ to repository root
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmalkmus committed Feb 17, 2022
1 parent 3c2abe9 commit e77ec89
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion axiom/encoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/axiomhq/axiom-go/axiom/testdata"
"github.com/axiomhq/axiom-go/testdata"
)

func TestGzipEncoder(t *testing.T) {
Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion axiom/testdata/testdata.go → testdata/testdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ var testdata []byte
func Load(tb testing.TB) []byte {
gzr, err := gzip.NewReader(bytes.NewReader(testdata))
require.NoError(tb, err)
defer gzr.Close()
defer func() {
require.NoError(tb, gzr.Close())
}()

b, err := io.ReadAll(gzr)
require.NoError(tb, err)
Expand Down

0 comments on commit e77ec89

Please sign in to comment.