From 378f1947d9a270d642aec8dae048fa3192e36936 Mon Sep 17 00:00:00 2001 From: Shiwei Zhang Date: Sat, 11 May 2024 17:08:28 +0800 Subject: [PATCH] test: fix file closing issue on windows Signed-off-by: Shiwei Zhang --- content/file/file_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/content/file/file_test.go b/content/file/file_test.go index e15d99dd..de6f2bb0 100644 --- a/content/file/file_test.go +++ b/content/file/file_test.go @@ -690,6 +690,7 @@ func TestStore_Dir_Push_SkipUnpack(t *testing.T) { if err != nil { t.Fatal("failed to open internal gz") } + defer pushedFile.Close() pushedContent, err := io.ReadAll(pushedFile) if err != nil { t.Fatal(err)