mirror of
https://github.com/restic/restic.git
synced 2025-08-14 04:27:42 +00:00
return error if RESTIC_COMPRESSION env variable is invalid
This commit is contained in:
@@ -679,3 +679,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