"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
Allow Fs tests to declare new config items
Nick Craig-Woodb4b4b6cb1cdc
diff --git a/fstest/fstests/fstests.go b/fstest/fstests/fstests.goindex f694359b1..eb167e7c1 100644--- a/fstest/fstests/fstests.go+++ b/fstest/fstests/fstests.go@@ -31,7 +31,9 @@ var (subRemoteLeaf = ""// NilObject should be set to a nil Object from the Fs under testNilObject fs.Object- file1 = fstest.Item{+ // ExtraConfig is for adding config to a remote+ ExtraConfig = []ExtraConfigItem{}+ file1 = fstest.Item{ModTime: fstest.Time("2001-02-03T04:05:06.499999999Z"),Path: "file name.txt",}@@ -45,6 +47,9 @@ var (dumpBodies = flag.Bool("dump-bodies", false, "Dump HTTP headers and bodies - may contain sensitive info"))+// ExtraConfigItem describes a config item added on the fly while testing+type ExtraConfigItem struct{ Name, Key, Value string }+const eventualConsistencyRetries = 10func init() {@@ -60,6 +65,10 @@ func TestInit(t *testing.T) {// "RCLONE_CONFIG_PASS=hunter2" (or your password)*fs.AskPassword = falsefs.LoadConfig()+ // Set extra config if supplied+ for _, item := range ExtraConfig {+ fs.ConfigFile.SetValue(item.Name, item.Key, item.Value)+ }fs.Config.Verbose = *verbosefs.Config.Quiet = !*verbosefs.Config.DumpHeaders = *dumpHeaders