From 5943e85df8d6b9f9a7b05db539b710c2d475dfd6 Mon Sep 17 00:00:00 2001 From: Selena Goods Date: Tue, 23 Jul 2024 15:09:20 -0400 Subject: [PATCH] Close gzip reader --- internal/provider/tar_archiver_test.go | 1 + 1 file changed, 1 insertion(+) 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)