backup: embed progress.Printer in backup specific printer

This commit is contained in:
Michael Eischer
2025-09-14 19:47:54 +02:00
parent e753941ad3
commit 1a76f988ea
5 changed files with 31 additions and 32 deletions

View File

@@ -7,10 +7,12 @@ import (
"github.com/restic/restic/internal/archiver"
"github.com/restic/restic/internal/restic"
"github.com/restic/restic/internal/ui/progress"
)
type mockPrinter struct {
sync.Mutex
progress.NoopPrinter
dirUnchanged, fileNew bool
id restic.ID
}
@@ -42,9 +44,6 @@ func (p *mockPrinter) Finish(id restic.ID, _ *archiver.Summary, _ bool) {
func (p *mockPrinter) Reset() {}
func (p *mockPrinter) P(_ string, _ ...interface{}) {}
func (p *mockPrinter) V(_ string, _ ...interface{}) {}
func TestProgress(t *testing.T) {
t.Parallel()