From 2869a8dce4dd308816da6b5e1e246ed3d8b7deac Mon Sep 17 00:00:00 2001 From: 70sh1 <70sh1@proton.me> Date: Wed, 3 Apr 2024 06:20:19 +0300 Subject: [PATCH] test: close file to fix residual tmp directory --- core/core_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/core/core_test.go b/core/core_test.go index d4ce8c1..72a3f18 100644 --- a/core/core_test.go +++ b/core/core_test.go @@ -314,6 +314,7 @@ func TestDecryptFileError(t *testing.T) { output := strings.TrimSuffix(input, ".eddy") file, err := os.Open(input) testutils.PanicIfErr(err) + defer file.Close() err = DecryptFile(file, output, "wrong-password", false, io.Discard) require.Error(t, err) require.NoFileExists(t, output)