"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
backend: allow wrapping backend tests to run in make quicktest
Nick Craig-Wood866c873daa97
diff --git a/backend/chunker/chunker_test.go b/backend/chunker/chunker_test.goindex 4acdf5b5a..cca76f9e7 100644--- a/backend/chunker/chunker_test.go+++ b/backend/chunker/chunker_test.go@@ -53,6 +53,7 @@ func TestIntegration(t *testing.T) {{Name: name, Key: "type", Value: "chunker"},{Name: name, Key: "remote", Value: tempDir},}+ opt.QuickTestOK = true}fstests.Run(t, &opt)}diff --git a/backend/combine/combine_test.go b/backend/combine/combine_test.goindex c6274c562..46b49bcf0 100644--- a/backend/combine/combine_test.go+++ b/backend/combine/combine_test.go@@ -35,6 +35,7 @@ func TestLocal(t *testing.T) {{Name: name, Key: "type", Value: "combine"},{Name: name, Key: "upstreams", Value: upstreams},},+ QuickTestOK: true,})}@@ -50,6 +51,7 @@ func TestMemory(t *testing.T) {{Name: name, Key: "type", Value: "combine"},{Name: name, Key: "upstreams", Value: upstreams},},+ QuickTestOK: true,})}diff --git a/backend/compress/compress_test.go b/backend/compress/compress_test.goindex 76baf22aa..356e9dd43 100644--- a/backend/compress/compress_test.go+++ b/backend/compress/compress_test.go@@ -61,5 +61,6 @@ func TestRemoteGzip(t *testing.T) {{Name: name, Key: "remote", Value: tempdir},{Name: name, Key: "compression_mode", Value: "gzip"},},+ QuickTestOK: true,})}diff --git a/backend/crypt/crypt_test.go b/backend/crypt/crypt_test.goindex 8369a60f7..d4b9dc1e4 100644--- a/backend/crypt/crypt_test.go+++ b/backend/crypt/crypt_test.go@@ -4,6 +4,7 @@ package crypt_testimport ("os""path/filepath"+ "runtime""testing""github.com/rclone/rclone/backend/crypt"@@ -46,6 +47,7 @@ func TestStandardBase32(t *testing.T) {},UnimplementableFsMethods: []string{"OpenWriterAt"},UnimplementableObjectMethods: []string{"MimeType"},+ QuickTestOK: true,})}@@ -67,6 +69,7 @@ func TestStandardBase64(t *testing.T) {},UnimplementableFsMethods: []string{"OpenWriterAt"},UnimplementableObjectMethods: []string{"MimeType"},+ QuickTestOK: true,})}@@ -88,6 +91,7 @@ func TestStandardBase32768(t *testing.T) {},UnimplementableFsMethods: []string{"OpenWriterAt"},UnimplementableObjectMethods: []string{"MimeType"},+ QuickTestOK: true,})}@@ -109,6 +113,7 @@ func TestOff(t *testing.T) {},UnimplementableFsMethods: []string{"OpenWriterAt"},UnimplementableObjectMethods: []string{"MimeType"},+ QuickTestOK: true,})}@@ -117,6 +122,9 @@ func TestObfuscate(t *testing.T) {if *fstest.RemoteName != "" {t.Skip("Skipping as -remote set")}+ if runtime.GOOS == "darwin" {+ t.Skip("Skipping on macOS as obfuscating control characters makes filenames macOS can't cope with")+ }tempdir := filepath.Join(os.TempDir(), "rclone-crypt-test-obfuscate")name := "TestCrypt3"fstests.Run(t, &fstests.Opt{@@ -131,6 +139,7 @@ func TestObfuscate(t *testing.T) {SkipBadWindowsCharacters: true,UnimplementableFsMethods: []string{"OpenWriterAt"},UnimplementableObjectMethods: []string{"MimeType"},+ QuickTestOK: true,})}@@ -139,6 +148,9 @@ func TestNoDataObfuscate(t *testing.T) {if *fstest.RemoteName != "" {t.Skip("Skipping as -remote set")}+ if runtime.GOOS == "darwin" {+ t.Skip("Skipping on macOS as obfuscating control characters makes filenames macOS can't cope with")+ }tempdir := filepath.Join(os.TempDir(), "rclone-crypt-test-obfuscate")name := "TestCrypt4"fstests.Run(t, &fstests.Opt{@@ -154,5 +166,6 @@ func TestNoDataObfuscate(t *testing.T) {SkipBadWindowsCharacters: true,UnimplementableFsMethods: []string{"OpenWriterAt"},UnimplementableObjectMethods: []string{"MimeType"},+ QuickTestOK: true,})}diff --git a/backend/hasher/hasher_test.go b/backend/hasher/hasher_test.goindex 09d60f33d..23feb9b96 100644--- a/backend/hasher/hasher_test.go+++ b/backend/hasher/hasher_test.go@@ -33,6 +33,7 @@ func TestIntegration(t *testing.T) {{Name: "TestHasher", Key: "remote", Value: tempDir},}opt.RemoteName = "TestHasher:"+ opt.QuickTestOK = true}fstests.Run(t, &opt)}diff --git a/backend/local/local_test.go b/backend/local/local_test.goindex 8ecab2dbd..d0d54ec26 100644--- a/backend/local/local_test.go+++ b/backend/local/local_test.go@@ -11,7 +11,8 @@ import (// TestIntegration runs integration tests against the remotefunc TestIntegration(t *testing.T) {fstests.Run(t, &fstests.Opt{- RemoteName: "",- NilObject: (*local.Object)(nil),+ RemoteName: "",+ NilObject: (*local.Object)(nil),+ QuickTestOK: true,})}diff --git a/backend/memory/memory_test.go b/backend/memory/memory_test.goindex 3d768fec0..9989bc60d 100644--- a/backend/memory/memory_test.go+++ b/backend/memory/memory_test.go@@ -10,7 +10,8 @@ import (// TestIntegration runs integration tests against the remotefunc TestIntegration(t *testing.T) {fstests.Run(t, &fstests.Opt{- RemoteName: ":memory:",- NilObject: (*Object)(nil),+ RemoteName: ":memory:",+ NilObject: (*Object)(nil),+ QuickTestOK: true,})}diff --git a/backend/union/union_test.go b/backend/union/union_test.goindex 8b69c4c27..f5a9948f6 100644--- a/backend/union/union_test.go+++ b/backend/union/union_test.go@@ -41,6 +41,7 @@ func TestStandard(t *testing.T) {},UnimplementableFsMethods: []string{"OpenWriterAt", "DuplicateFiles"},UnimplementableObjectMethods: []string{"MimeType"},+ QuickTestOK: true,})}@@ -62,6 +63,7 @@ func TestRO(t *testing.T) {},UnimplementableFsMethods: []string{"OpenWriterAt", "DuplicateFiles"},UnimplementableObjectMethods: []string{"MimeType"},+ QuickTestOK: true,})}@@ -83,6 +85,7 @@ func TestNC(t *testing.T) {},UnimplementableFsMethods: []string{"OpenWriterAt", "DuplicateFiles"},UnimplementableObjectMethods: []string{"MimeType"},+ QuickTestOK: true,})}@@ -104,6 +107,7 @@ func TestPolicy1(t *testing.T) {},UnimplementableFsMethods: []string{"OpenWriterAt", "DuplicateFiles"},UnimplementableObjectMethods: []string{"MimeType"},+ QuickTestOK: true,})}@@ -125,6 +129,7 @@ func TestPolicy2(t *testing.T) {},UnimplementableFsMethods: []string{"OpenWriterAt", "DuplicateFiles"},UnimplementableObjectMethods: []string{"MimeType"},+ QuickTestOK: true,})}@@ -146,5 +151,6 @@ func TestPolicy3(t *testing.T) {},UnimplementableFsMethods: []string{"OpenWriterAt", "DuplicateFiles"},UnimplementableObjectMethods: []string{"MimeType"},+ QuickTestOK: true,})}diff --git a/fstest/fstests/fstests.go b/fstest/fstests/fstests.goindex 9cc95896e..7a72ef5f5 100644--- a/fstest/fstests/fstests.go+++ b/fstest/fstests/fstests.go@@ -327,6 +327,7 @@ type Opt struct {SkipFsCheckWrap bool // if set skip FsCheckWrapSkipObjectCheckWrap bool // if set skip ObjectCheckWrapSkipInvalidUTF8 bool // if set skip invalid UTF-8 checks+ QuickTestOK bool // if set, run this test with make quicktest}// returns true if x is found in ss@@ -392,7 +393,7 @@ func Run(t *testing.T, opt *Opt) {unwrappableFsMethods = []string{"Command"} // these Fs methods don't need to be wrapped ever)- if strings.HasSuffix(os.Getenv("RCLONE_CONFIG"), "/notfound") && *fstest.RemoteName == "" {+ if strings.HasSuffix(os.Getenv("RCLONE_CONFIG"), "/notfound") && *fstest.RemoteName == "" && !opt.QuickTestOK {t.Skip("quicktest only")}