retry key loading on hash mismatch

This commit is contained in:
Michael Eischer 2021-09-19 19:58:47 +02:00
parent 78d2312ee9
commit 822422ef03
3 changed files with 57 additions and 1 deletions

View file

@ -48,7 +48,6 @@ func remove(t testing.TB, be restic.Backend, h restic.Handle) {
func randomData(n int) (restic.Handle, []byte) {
data := test.Random(rand.Int(), n)
id := restic.Hash(data)
copy(id[:], data)
h := restic.Handle{
Type: restic.IndexFile,
Name: id.String(),