mirror of
https://github.com/restic/restic.git
synced 2025-12-04 03:38:25 +00:00
repository: Allow skipping verification for tests
Some tests have to explicitly create pack files with blobs that don't match their ID. For those blobs the builtin verification of the repository must be disabled.
This commit is contained in:
@@ -102,7 +102,8 @@ func testRepairBrokenPack(t *testing.T, version uint) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
repo := repository.TestRepositoryWithVersion(t, version)
|
||||
// disable verification to allow adding corrupted blobs to the repository
|
||||
repo := repository.TestRepositoryWithBackend(t, nil, version, repository.Options{NoVerifyPack: true})
|
||||
|
||||
seed := time.Now().UnixNano()
|
||||
rand.Seed(seed)
|
||||
|
||||
Reference in New Issue
Block a user