mirror of
https://github.com/restic/restic.git
synced 2026-11-10 08:41:00 +00:00
restic: introduce Counter interface to decouple from ui/progress (#21861)
decouple restic and ui/progress packages
This commit is contained in:
1 parent
22a304af7e
commit
8e11f5747d
37 files changed
+181
-145
No files matched your search
@@ -12,7 +12,7 @@ import (
|
||||
func TestCheckRepo(t testing.TB, repo checkerRepository) {
|
||||
chkr := New(repo, true)
|
||||
|
||||
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)
|
||||
}
|
||||
@@ -36,7 +36,7 @@ func TestCheckRepo(t testing.TB, repo checkerRepository) {
|
||||
|
||||
// structure
|
||||
errChan = make(chan error)
|
||||
go chkr.Structure(context.TODO(), nil, errChan)
|
||||
go chkr.Structure(context.TODO(), restic.NoopCounter, errChan)
|
||||
|
||||
for err := range errChan {
|
||||
t.Error(err)
|
||||
@@ -55,7 +55,7 @@ func TestCheckRepo(t testing.TB, repo checkerRepository) {
|
||||
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