mirror of
https://github.com/restic/restic.git
synced 2026-08-06 05:33:17 +00:00
ui/progress: unexport NoopPrinter and add New* function
This commit is contained in:
@@ -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