new sub-option for backup: time

New option to specify the timestamp for a backup
This commit is contained in:
Tobias Klein committed 2017-09-09 13:26:35 +02:00
1 parent 5c75a98053
commit 43ff971dfd
6 files changed
+19 -8

No files matched your search

+2 -1
View File
@@ -3,6 +3,7 @@ package archiver
import (
"context"
"testing"
"time"
"github.com/restic/restic/internal/restic"
)
@@ -10,7 +11,7 @@ import (
// 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)
sn, _, err := arch.Snapshot(context.TODO(), nil, []string{path}, []string{"test"}, "localhost", parent, time.Now())
if err != nil {
t.Fatal(err)
}