diff --git a/internal/archiver/archiver_test.go b/internal/archiver/archiver_test.go index aaaf02a22..88c85aa98 100644 --- a/internal/archiver/archiver_test.go +++ b/internal/archiver/archiver_test.go @@ -108,7 +108,7 @@ func archiveDirectory(b testing.TB) { arch := archiver.New(repo) - _, id, err := arch.Snapshot(context.TODO(), nil, []string{BenchArchiveDirectory}, nil, "localhost", nil) + _, id, err := arch.Snapshot(context.TODO(), nil, []string{BenchArchiveDirectory}, nil, "localhost", nil, time.Now()) OK(b, err) b.Logf("snapshot archived as %v", id) @@ -302,7 +302,7 @@ func TestArchiveEmptySnapshot(t *testing.T) { arch := archiver.New(repo) - sn, id, err := arch.Snapshot(context.TODO(), nil, []string{"file-does-not-exist-123123213123", "file2-does-not-exist-too-123123123"}, nil, "localhost", nil) + sn, id, err := arch.Snapshot(context.TODO(), nil, []string{"file-does-not-exist-123123213123", "file2-does-not-exist-too-123123123"}, nil, "localhost", nil, time.Now()) if err == nil { t.Errorf("expected error for empty snapshot, got nil") } diff --git a/internal/checker/checker_test.go b/internal/checker/checker_test.go index 20be752be..d91c95054 100644 --- a/internal/checker/checker_test.go +++ b/internal/checker/checker_test.go @@ -7,6 +7,7 @@ import ( "path/filepath" "sort" "testing" + "time" "github.com/restic/restic/internal/archiver" "github.com/restic/restic/internal/checker" @@ -305,7 +306,7 @@ func TestCheckerModifiedData(t *testing.T) { defer cleanup() arch := archiver.New(repo) - _, id, err := arch.Snapshot(context.TODO(), nil, []string{"."}, nil, "localhost", nil) + _, id, err := arch.Snapshot(context.TODO(), nil, []string{"."}, nil, "localhost", nil, time.Now()) test.OK(t, err) t.Logf("archived as %v", id.Str()) diff --git a/internal/restic/snapshot_test.go b/internal/restic/snapshot_test.go index 50ebe7297..c02970ebb 100644 --- a/internal/restic/snapshot_test.go +++ b/internal/restic/snapshot_test.go @@ -2,6 +2,7 @@ package restic_test import ( "testing" + "time" "github.com/restic/restic/internal/restic" . "github.com/restic/restic/internal/test" @@ -10,6 +11,6 @@ import ( func TestNewSnapshot(t *testing.T) { paths := []string{"/home/foobar"} - _, err := restic.NewSnapshot(paths, nil, "foo") + _, err := restic.NewSnapshot(paths, nil, "foo", time.Now()) OK(t, err) } diff --git a/internal/walk/walk_test.go b/internal/walk/walk_test.go index 801e0aa32..699000292 100644 --- a/internal/walk/walk_test.go +++ b/internal/walk/walk_test.go @@ -25,7 +25,7 @@ func TestWalkTree(t *testing.T) { // archive a few files arch := archiver.New(repo) - sn, _, err := arch.Snapshot(context.TODO(), nil, dirs, nil, "localhost", nil) + sn, _, err := arch.Snapshot(context.TODO(), nil, dirs, nil, "localhost", nil, time.Now()) OK(t, err) // flush repo, write all packs