mirror of
https://github.com/restic/restic.git
synced 2026-11-10 08:41:00 +00:00
archiver: pass ItemAction to progress reporter instead of data.Node (#21886)
This commit is contained in:
1 parent
57ac5d107c
commit
532f36a5a8
4 files changed
+84
-56
No files matched your search
@@ -6,7 +6,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/restic/restic/internal/archiver"
|
||||
"github.com/restic/restic/internal/data"
|
||||
"github.com/restic/restic/internal/restic"
|
||||
)
|
||||
|
||||
@@ -54,11 +53,9 @@ func TestProgress(t *testing.T) {
|
||||
prog.CompleteBlob(1024)
|
||||
|
||||
// "dir unchanged"
|
||||
node := data.Node{Type: data.NodeTypeDir}
|
||||
prog.CompleteItem("foo", &node, &node, archiver.ItemStats{}, 0)
|
||||
prog.CompleteItem("foo", archiver.ActionDirUnchanged, archiver.ItemStats{}, 0)
|
||||
// "file new"
|
||||
node.Type = data.NodeTypeFile
|
||||
prog.CompleteItem("foo", nil, &node, archiver.ItemStats{}, 0)
|
||||
prog.CompleteItem("foo", archiver.ActionFileNew, archiver.ItemStats{}, 0)
|
||||
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
id := restic.NewRandomID()
|
||||
|
||||
Reference in new issue
Block a user