restic: introduce Counter interface to decouple from ui/progress (#21861)

decouple restic and ui/progress packages
This commit is contained in:
Michael Eischer
2026-06-13 21:08:18 +02:00
committed by GitHub
parent 22a304af7e
commit 8e11f5747d
37 changed files with 181 additions and 145 deletions
+2 -2
View File
@@ -167,7 +167,7 @@ func TestNewLock(_ *testing.T, repo *Repository, exclusive bool) (*restic.Lock,
func TestCheckRepo(t testing.TB, repo *Repository) {
chkr := newChecker(repo)
hints, errs := chkr.LoadIndex(context.TODO(), nil)
hints, errs := chkr.LoadIndex(context.TODO(), restic.NoopTerminalCounterFactory)
if len(errs) != 0 {
t.Fatalf("errors loading index: %v", errs)
}
@@ -188,7 +188,7 @@ func TestCheckRepo(t testing.TB, repo *Repository) {
errChan = make(chan error)
go chkr.ReadPacks(context.TODO(), func(packs map[restic.ID]int64) map[restic.ID]int64 {
return packs
}, nil, errChan)
}, restic.NoopCounter, errChan)
for err := range errChan {
t.Error(err)