restic: Change FindSnapshot functions to return the snapshot
This commit is contained in:
parent
b50f48594d
commit
a3113c6097
15 changed files with 103 additions and 160 deletions
|
@ -26,7 +26,11 @@ func TestSnapshot(t testing.TB, repo restic.Repository, path string, parent *res
|
|||
Tags: []string{"test"},
|
||||
}
|
||||
if parent != nil {
|
||||
opts.ParentSnapshot = *parent
|
||||
sn, err := restic.LoadSnapshot(context.TODO(), arch.Repo, *parent)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
opts.ParentSnapshot = sn
|
||||
}
|
||||
sn, _, err := arch.Snapshot(context.TODO(), []string{path}, opts)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue