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

Fix rmdirs test

Nick Craig-Wood539853df36b0
diff --git a/fs/operations_test.go b/fs/operations_test.go
index 48514c4d6..089a5d35a 100644
--- a/fs/operations_test.go
+++ b/fs/operations_test.go
@@ -642,6 +642,11 @@ func TestCat(t *testing.T) {
func TestRmdirs(t *testing.T) {
r := NewRun(t)
defer r.Finalise()
+
+ // Clean any directories that have crept in so far
+ // FIXME make the Finalise method do this?
+ require.NoError(t, fs.Rmdirs(r.fremote))
+
// Make some files and dirs we expect to keep
file1 := r.WriteObject("A1/B1/C1/one", "aaa", t1)
file2 := r.WriteObject("A1/two", "bbb", t2)