From 696c18e031c96128da027b71a0f054c9e93a5014 Mon Sep 17 00:00:00 2001 From: Alexander Weiss Date: Mon, 28 Dec 2020 07:46:56 +0100 Subject: [PATCH] Add possibility to set snapshot ID (used in test) --- internal/restic/snapshot.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/restic/snapshot.go b/internal/restic/snapshot.go index b12548459..2e8fa8a15 100644 --- a/internal/restic/snapshot.go +++ b/internal/restic/snapshot.go @@ -146,6 +146,11 @@ func (sn Snapshot) ID() *ID { return sn.id } +// SetID sets the snapshot's ID. +func (sn *Snapshot) SetID(id ID) { + sn.id = &id +} + func (sn *Snapshot) fillUserInfo() error { usr, err := user.Current() if err != nil {