Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

local: make sure we close file handle in local tests

Nick Craig-Wood74297a0c5599
diff --git a/backend/local/local_internal_test.go b/backend/local/local_internal_test.go
index 46493f1ee..f34d54a18 100644
--- a/backend/local/local_internal_test.go
+++ b/backend/local/local_internal_test.go
@@ -47,6 +47,9 @@ func TestUpdatingCheck(t *testing.T) {
if err != nil {
t.Fatalf("failed opening file %q: %v", filePath, err)
}
+ defer func() {
+ require.NoError(t, fd.Close())
+ }()
fi, err := fd.Stat()
require.NoError(t, err)