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

lsf: fix integration tests

Nick Craig-Wood712e6a8085ac
diff --git a/crypt/crypt.go b/crypt/crypt.go
index 87a3a4694..dcd69798c 100644
--- a/crypt/crypt.go
+++ b/crypt/crypt.go
@@ -554,7 +554,7 @@ func (o *Object) Size() int64 {
// Hash returns the selected checksum of the file
// If no checksum is available it returns ""
func (o *Object) Hash(hash fs.HashType) (string, error) {
- return "", nil
+ return "", fs.ErrHashUnsupported
}
// UnWrap returns the wrapped Object
diff --git a/fs/operations_test.go b/fs/operations_test.go
index 40bb1e0d2..8384ca79b 100644
--- a/fs/operations_test.go
+++ b/fs/operations_test.go
@@ -1011,7 +1011,7 @@ func TestListFormat(t *testing.T) {
list.SetOutput(nil)
list.AddHash(test.ht)
got := fs.ListFormatted(&items[0], &list)
- if got != "UNSUPPORTED" {
+ if got != "UNSUPPORTED" && got != "" {
assert.Equal(t, test.want, got)
}
}