mirror of
https://github.com/restic/restic.git
synced 2026-10-06 02:40:31 +00:00
archiver: refactor summary collection from ui into the archiver
This commit is contained in:
@@ -33,11 +33,10 @@ func (p *mockPrinter) CompleteItem(messageType string, _ string, _ archiver.Item
|
||||
}
|
||||
|
||||
func (p *mockPrinter) ReportTotal(_ time.Time, _ archiver.ScanStats) {}
|
||||
func (p *mockPrinter) Finish(id restic.ID, _ time.Time, summary *Summary, _ bool) {
|
||||
func (p *mockPrinter) Finish(id restic.ID, _ time.Time, _ *archiver.Summary, _ bool) {
|
||||
p.Lock()
|
||||
defer p.Unlock()
|
||||
|
||||
_ = *summary // Should not be nil.
|
||||
p.id = id
|
||||
}
|
||||
|
||||
@@ -64,7 +63,7 @@ func TestProgress(t *testing.T) {
|
||||
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
id := restic.NewRandomID()
|
||||
prog.Finish(id, false)
|
||||
prog.Finish(id, nil, false)
|
||||
|
||||
if !prnt.dirUnchanged {
|
||||
t.Error(`"dir unchanged" event not seen`)
|
||||
|
||||
Reference in New Issue
Block a user