mirror of
https://github.com/restic/restic.git
synced 2026-11-19 23:01:08 +00:00
Merge pull request #3992 from MichaelEischer/err-on-invalid-compression
Return error if RESTIC_COMPRESSION env variable is invalid
This commit is contained in:
2 files changed
+17
-3
No files matched your search
@@ -681,3 +681,11 @@ func testStreamPack(t *testing.T, version uint) {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func TestInvalidCompression(t *testing.T) {
|
||||
var comp repository.CompressionMode
|
||||
err := comp.Set("nope")
|
||||
rtest.Assert(t, err != nil, "missing error")
|
||||
_, err = repository.New(nil, repository.Options{Compression: comp})
|
||||
rtest.Assert(t, err != nil, "missing error")
|
||||
}
|
||||
Reference in new issue
Block a user