"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
Reset password/config path in config tests to fix other tests
Nick Craig-Wood41eb386063ca
diff --git a/fs/config_test.go b/fs/config_test.goindex a43b6f043..04849585c 100644--- a/fs/config_test.go+++ b/fs/config_test.go@@ -79,8 +79,12 @@ func TestReveal(t *testing.T) {}func TestConfigLoad(t *testing.T) {+ oldConfigPath := ConfigPathConfigPath = "./testdata/plain.conf"- configKey = nil+ defer func() {+ ConfigPath = oldConfigPath+ }()+ configKey = nil // reset passwordc, err := loadConfigFile()if err != nil {t.Fatal(err)@@ -100,7 +104,12 @@ func TestConfigLoad(t *testing.T) {func TestConfigLoadEncrypted(t *testing.T) {var err error+ oldConfigPath := ConfigPathConfigPath = "./testdata/encrypted.conf"+ defer func() {+ ConfigPath = oldConfigPath+ configKey = nil // reset password+ }()// Set correct passworderr = setPassword("asdf")@@ -128,7 +137,9 @@ func TestConfigLoadEncryptedFailures(t *testing.T) {var err error// This file should be too short to be decoded.+ oldConfigPath := ConfigPathConfigPath = "./testdata/enc-short.conf"+ defer func() { ConfigPath = oldConfigPath }()_, err = loadConfigFile()if err == nil {t.Fatal("expected error")@@ -163,6 +174,9 @@ func TestConfigLoadEncryptedFailures(t *testing.T) {}func TestPassword(t *testing.T) {+ defer func() {+ configKey = nil // reset password+ }()var err error// Empty password should give errorerr = setPassword(" \t ")