mirror of
https://github.com/restic/restic.git
synced 2025-12-11 18:47:50 +00:00
restorer: use options struct
This commit is contained in:
@@ -343,7 +343,7 @@ func TestRestorer(t *testing.T) {
|
||||
sn, id := saveSnapshot(t, repo, test.Snapshot, noopGetGenericAttributes)
|
||||
t.Logf("snapshot saved as %v", id.Str())
|
||||
|
||||
res := NewRestorer(repo, sn, false, nil)
|
||||
res := NewRestorer(repo, sn, Options{})
|
||||
|
||||
tempdir := rtest.TempDir(t)
|
||||
// make sure we're creating a new subdir of the tempdir
|
||||
@@ -460,7 +460,7 @@ func TestRestorerRelative(t *testing.T) {
|
||||
sn, id := saveSnapshot(t, repo, test.Snapshot, noopGetGenericAttributes)
|
||||
t.Logf("snapshot saved as %v", id.Str())
|
||||
|
||||
res := NewRestorer(repo, sn, false, nil)
|
||||
res := NewRestorer(repo, sn, Options{})
|
||||
|
||||
tempdir := rtest.TempDir(t)
|
||||
cleanup := rtest.Chdir(t, tempdir)
|
||||
@@ -689,7 +689,7 @@ func TestRestorerTraverseTree(t *testing.T) {
|
||||
repo := repository.TestRepository(t)
|
||||
sn, _ := saveSnapshot(t, repo, test.Snapshot, noopGetGenericAttributes)
|
||||
|
||||
res := NewRestorer(repo, sn, false, nil)
|
||||
res := NewRestorer(repo, sn, Options{})
|
||||
|
||||
res.SelectFilter = test.Select
|
||||
|
||||
@@ -765,7 +765,7 @@ func TestRestorerConsistentTimestampsAndPermissions(t *testing.T) {
|
||||
},
|
||||
}, noopGetGenericAttributes)
|
||||
|
||||
res := NewRestorer(repo, sn, false, nil)
|
||||
res := NewRestorer(repo, sn, Options{})
|
||||
|
||||
res.SelectFilter = func(item string, dstpath string, node *restic.Node) (selectedForRestore bool, childMayBeSelected bool) {
|
||||
switch filepath.ToSlash(item) {
|
||||
@@ -820,7 +820,7 @@ func TestVerifyCancel(t *testing.T) {
|
||||
repo := repository.TestRepository(t)
|
||||
sn, _ := saveSnapshot(t, repo, snapshot, noopGetGenericAttributes)
|
||||
|
||||
res := NewRestorer(repo, sn, false, nil)
|
||||
res := NewRestorer(repo, sn, Options{})
|
||||
|
||||
tempdir := rtest.TempDir(t)
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
@@ -862,7 +862,7 @@ func TestRestorerSparseFiles(t *testing.T) {
|
||||
archiver.SnapshotOptions{})
|
||||
rtest.OK(t, err)
|
||||
|
||||
res := NewRestorer(repo, sn, true, nil)
|
||||
res := NewRestorer(repo, sn, Options{Sparse: true})
|
||||
|
||||
tempdir := rtest.TempDir(t)
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
||||
Reference in New Issue
Block a user