mirror of
https://github.com/restic/restic.git
synced 2026-06-27 02:54:19 +00:00
repository: default to fastest compression in tests
This commit is contained in:
@@ -125,7 +125,7 @@ func TestPruneSmall(t *testing.T) {
|
||||
t.Logf("rand initialized with seed %d", seed)
|
||||
|
||||
be := repository.TestBackend(t)
|
||||
repo, _ := repository.TestRepositoryWithBackend(t, be, 0, repository.Options{PackSize: repository.MinPackSize})
|
||||
repo, _ := repository.TestRepositoryWithBackend(t, be, 0, repository.Options{PackSize: repository.MinPackSize, Compression: repository.CompressionOff})
|
||||
|
||||
const blobSize = 1000 * 1000
|
||||
const numBlobsCreated = 55
|
||||
|
||||
@@ -54,6 +54,10 @@ func TestRepositoryWithBackend(t testing.TB, be backend.Backend, version uint, o
|
||||
if be == nil {
|
||||
be = TestBackend(t)
|
||||
}
|
||||
// Speed up tests by default
|
||||
if opts.Compression == CompressionAuto {
|
||||
opts.Compression = CompressionFastest
|
||||
}
|
||||
|
||||
repo, err := New(be, opts)
|
||||
if err != nil {
|
||||
@@ -126,7 +130,7 @@ func TestOpenLocal(t testing.TB, dir string) (*Repository, backend.Backend) {
|
||||
}
|
||||
|
||||
func TestOpenBackend(t testing.TB, be backend.Backend) *Repository {
|
||||
repo, err := New(be, Options{})
|
||||
repo, err := New(be, Options{Compression: CompressionFastest})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user