From b5bb4c2a215249f5534f3aaf6166dd29fa81194f Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 15 Nov 2019 09:26:40 +0000 Subject: [PATCH] vfs: fix tests not to upload a 0 length file Some remotes can't upload 0 length files, so this fixes the TestCacheRename test so that it writes something to the file. --- vfs/read_write_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vfs/read_write_test.go b/vfs/read_write_test.go index 3d1df648a..4bdfca579 100644 --- a/vfs/read_write_test.go +++ b/vfs/read_write_test.go @@ -620,6 +620,8 @@ func TestCacheRename(t *testing.T) { h, err := vfs.OpenFile("rename_me", os.O_WRONLY|os.O_CREATE, 0777) require.NoError(t, err) + _, err = h.WriteString("hello") + require.NoError(t, err) fh, ok := h.(*RWFileHandle) require.True(t, ok)