aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2023-01-14 13:23:02 +0100
committerMichael Muré <batolettre@gmail.com>2023-01-14 13:23:02 +0100
commit5bf274e64a3486bba21edd9bf455089839219f25 (patch)
treebb4d8bc2c1fd5614d274dab272e7dae03da5496b
parent03dcd7eea29c86a7e2e5056554649c1327f198cb (diff)
downloadgit-bug-5bf274e64a3486bba21edd9bf455089839219f25.tar.gz
repo: don't forget to close a file
-rw-r--r--repository/repo_testing.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/repository/repo_testing.go b/repository/repo_testing.go
index 09332e62..3dd702f4 100644
--- a/repository/repo_testing.go
+++ b/repository/repo_testing.go
@@ -63,6 +63,9 @@ func RepoStorageTest(t *testing.T, repo RepoStorage) {
_, err = f.Write([]byte("hello"))
require.NoError(t, err)
+ err = f.Close()
+ require.NoError(t, err)
+
// remove all
err = storage.RemoveAll(".")
require.NoError(t, err)