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

amazonclouddrive, rcat: ensure rcat integration test passes even with AmazonCloudDrive (fixes: #1680)

Stefan Breunig9d3f11b49367
diff --git a/fs/operations_test.go b/fs/operations_test.go
index 1ac25457a..d5da8ae22 100644
--- a/fs/operations_test.go
+++ b/fs/operations_test.go
@@ -735,17 +735,23 @@ func TestRcat(t *testing.T) {
checkSumBefore := fs.Config.CheckSum
defer func() { fs.Config.CheckSum = checkSumBefore }()
- check := func() {
+ check := func(withChecksum bool) {
+ fs.Config.CheckSum = withChecksum
+ prefix := "no_checksum_"
+ if withChecksum {
+ prefix = "with_checksum_"
+ }
+
r := NewRun(t)
defer r.Finalise()
fstest.CheckListing(t, r.fremote, []fstest.Item{})
data1 := "this is some really nice test data"
- path1 := "small_file_from_pipe"
+ path1 := prefix + "small_file_from_pipe"
data2 := string(make([]byte, fs.Config.StreamingUploadCutoff+1))
- path2 := "big_file_from_pipe"
+ path2 := prefix + "big_file_from_pipe"
in := ioutil.NopCloser(strings.NewReader(data1))
err := fs.Rcat(r.fremote, path1, in, t1)
@@ -760,11 +766,8 @@ func TestRcat(t *testing.T) {
fstest.CheckItems(t, r.fremote, file1, file2)
}
- fs.Config.CheckSum = true
- check()
-
- fs.Config.CheckSum = false
- check()
+ check(true)
+ check(false)
}
func TestRmdirs(t *testing.T) {