mirror of
https://github.com/restic/restic.git
synced 2026-11-06 07:19:21 +00:00
ui/progress: unexport NoopPrinter and add New* function
This commit is contained in:
1 parent
e8ed2434cd
commit
0bbfb072af
13 files changed
+41
-35
No files matched your search
@@ -41,10 +41,10 @@ func testPrune(t *testing.T, opts repository.PruneOptions, errOnUnused bool) {
|
||||
usedBlobs.Insert(blob)
|
||||
}
|
||||
return nil
|
||||
}, &progress.NoopPrinter{})
|
||||
}, progress.NewNoopPrinter())
|
||||
rtest.OK(t, err)
|
||||
|
||||
rtest.OK(t, plan.Execute(context.TODO(), &progress.NoopPrinter{}))
|
||||
rtest.OK(t, plan.Execute(context.TODO(), progress.NewNoopPrinter()))
|
||||
|
||||
repo = repository.TestOpenBackend(t, be)
|
||||
repository.TestCheckRepo(t, repo)
|
||||
@@ -165,9 +165,9 @@ func TestPruneSmall(t *testing.T) {
|
||||
usedBlobs.Insert(blob)
|
||||
}
|
||||
return nil
|
||||
}, &progress.NoopPrinter{})
|
||||
}, progress.NewNoopPrinter())
|
||||
rtest.OK(t, err)
|
||||
rtest.OK(t, plan.Execute(context.TODO(), &progress.NoopPrinter{}))
|
||||
rtest.OK(t, plan.Execute(context.TODO(), progress.NewNoopPrinter()))
|
||||
|
||||
stats := plan.Stats()
|
||||
rtest.Equals(t, stats.Size.Used/blobSize, uint64(numBlobsCreated), fmt.Sprintf("total size of blobs should be %d but is %d",
|
||||
|
||||
Reference in new issue
Block a user