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

compress: fix integration tests by adding missing OpenChunkWriter exclude

Nick Craig-Wood4fbe0652c994
diff --git a/backend/compress/compress_test.go b/backend/compress/compress_test.go
index bb74f0aca..8fc954dfa 100644
--- a/backend/compress/compress_test.go
+++ b/backend/compress/compress_test.go
@@ -14,23 +14,26 @@ import (
"github.com/rclone/rclone/fstest/fstests"
)
+var defaultOpt = fstests.Opt{
+ RemoteName: "TestCompress:",
+ NilObject: (*Object)(nil),
+ UnimplementableFsMethods: []string{
+ "OpenWriterAt",
+ "OpenChunkWriter",
+ "MergeDirs",
+ "DirCacheFlush",
+ "PutUnchecked",
+ "PutStream",
+ "UserInfo",
+ "Disconnect",
+ },
+ TiersToTest: []string{"STANDARD", "STANDARD_IA"},
+ UnimplementableObjectMethods: []string{},
+}
+
// TestIntegration runs integration tests against the remote
func TestIntegration(t *testing.T) {
- opt := fstests.Opt{
- RemoteName: *fstest.RemoteName,
- NilObject: (*Object)(nil),
- UnimplementableFsMethods: []string{
- "OpenWriterAt",
- "MergeDirs",
- "DirCacheFlush",
- "PutUnchecked",
- "PutStream",
- "UserInfo",
- "Disconnect",
- },
- TiersToTest: []string{"STANDARD", "STANDARD_IA"},
- UnimplementableObjectMethods: []string{}}
- fstests.Run(t, &opt)
+ fstests.Run(t, &defaultOpt)
}
// TestRemoteGzip tests GZIP compression
@@ -40,28 +43,13 @@ func TestRemoteGzip(t *testing.T) {
}
tempdir := filepath.Join(os.TempDir(), "rclone-compress-test-gzip")
name := "TestCompressGzip"
- fstests.Run(t, &fstests.Opt{
- RemoteName: name + ":",
- NilObject: (*Object)(nil),
- UnimplementableFsMethods: []string{
- "OpenWriterAt",
- "OpenChunkWriter",
- "MergeDirs",
- "DirCacheFlush",
- "PutUnchecked",
- "PutStream",
- "UserInfo",
- "Disconnect",
- },
- UnimplementableObjectMethods: []string{
- "GetTier",
- "SetTier",
- },
- ExtraConfig: []fstests.ExtraConfigItem{
- {Name: name, Key: "type", Value: "compress"},
- {Name: name, Key: "remote", Value: tempdir},
- {Name: name, Key: "compression_mode", Value: "gzip"},
- },
- QuickTestOK: true,
- })
+ opt := defaultOpt
+ opt.RemoteName = name + ":"
+ opt.ExtraConfig = []fstests.ExtraConfigItem{
+ {Name: name, Key: "type", Value: "compress"},
+ {Name: name, Key: "remote", Value: tempdir},
+ {Name: name, Key: "compression_mode", Value: "gzip"},
+ }
+ opt.QuickTestOK = true
+ fstests.Run(t, &opt)
}