ui/progress: unexport NoopPrinter and add New* function

This commit is contained in:
Michael Eischer
2026-06-13 16:53:57 +02:00
parent e8ed2434cd
commit 0bbfb072af
13 changed files with 41 additions and 35 deletions
+4 -4
View File
@@ -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",