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

fstests: attempt to fix flaky serve s3 test

Nick Craig-Wood089c168fb9e8
diff --git a/fstest/fstests/fstests.go b/fstest/fstests/fstests.go
index be43a015a..2e840cd0c 100644
--- a/fstest/fstests/fstests.go
+++ b/fstest/fstests/fstests.go
@@ -762,9 +762,15 @@ func Run(t *testing.T, opt *Opt) {
// assert.Nil(t, obj) - FIXME some remotes return the object even on nil
assert.NotNil(t, err)
- obj, err := f.NewObject(ctx, file2.Path)
- assert.Nil(t, obj)
- assert.Equal(t, fs.ErrorObjectNotFound, err)
+ retry(t, "FsPutError: test object does not exist", func() error {
+ obj, err := f.NewObject(ctx, file2.Path)
+ if err == nil {
+ return fserrors.RetryErrorf("object is present")
+ }
+ assert.Nil(t, obj)
+ assert.Equal(t, fs.ErrorObjectNotFound, err)
+ return nil
+ })
})
t.Run("FsPutZeroLength", func(t *testing.T) {