mirror of
https://github.com/restic/restic.git
synced 2026-09-20 19:18:31 +00:00
restic: introduce Counter interface to decouple from ui/progress (#21861)
decouple restic and ui/progress packages
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user