mirror of
https://github.com/restic/restic.git
synced 2025-08-21 05:17:35 +00:00
Moves files
This commit is contained in:
17
internal/archiver/testing.go
Normal file
17
internal/archiver/testing.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package archiver
|
||||
|
||||
import (
|
||||
"context"
|
||||
"restic"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// TestSnapshot creates a new snapshot of path.
|
||||
func TestSnapshot(t testing.TB, repo restic.Repository, path string, parent *restic.ID) *restic.Snapshot {
|
||||
arch := New(repo)
|
||||
sn, _, err := arch.Snapshot(context.TODO(), nil, []string{path}, []string{"test"}, "localhost", parent)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
return sn
|
||||
}
|
Reference in New Issue
Block a user