diff --git a/internal/checker/checker_test.go b/internal/checker/checker_test.go index 775484652..6405ecfbd 100644 --- a/internal/checker/checker_test.go +++ b/internal/checker/checker_test.go @@ -331,10 +331,6 @@ func (erd errorReadCloser) Read(p []byte) (int, error) { // induceError flips a bit in the slice. func induceError(data []byte) { - if rand.Float32() < 0.2 { - return - } - pos := rand.Intn(len(data)) data[pos] ^= 1 } diff --git a/internal/restic/snapshot.go b/internal/restic/snapshot.go index 58d863526..1f6e4534b 100644 --- a/internal/restic/snapshot.go +++ b/internal/restic/snapshot.go @@ -61,7 +61,7 @@ func LoadSnapshot(ctx context.Context, loader LoaderUnpacked, id ID) (*Snapshot, sn := &Snapshot{id: &id} err := LoadJSONUnpacked(ctx, loader, SnapshotFile, id, sn) if err != nil { - return nil, err + return nil, fmt.Errorf("failed to load snapshot %v: %w", id.Str(), err) } return sn, nil