diff --git a/internal/provider/tar_archiver_test.go b/internal/provider/tar_archiver_test.go index 70ac5d5e..26edb907 100644 --- a/internal/provider/tar_archiver_test.go +++ b/internal/provider/tar_archiver_test.go @@ -321,6 +321,7 @@ func ensureTarContents(t *testing.T, tarfilepath string, wants map[string][]byte if err != nil { t.Fatalf("could not open tar.gz file: %s", err) } + defer gzf.Close() tarReader := tar.NewReader(gzf)