fix(cmd_backup): Use restic.TagLists

This commit is contained in:
Quentin Lemaire 2020-12-28 16:33:10 +01:00
parent 334d8ce724
commit e88f3fb80c
No known key found for this signature in database
GPG Key ID: 5A99AA8DCE71630E
2 changed files with 3 additions and 3 deletions

View File

@ -83,7 +83,7 @@ type BackupOptions struct {
ExcludeLargerThan string
Stdin bool
StdinFilename string
Tags restic.TagList
Tags restic.TagLists
Host string
FilesFrom []string
FilesFromVerbatim []string
@ -682,7 +682,7 @@ func runBackup(opts BackupOptions, gopts GlobalOptions, term *termstatus.Termina
snapshotOpts := archiver.SnapshotOptions{
Excludes: opts.Excludes,
Tags: opts.Tags,
Tags: opts.Tags.Flatten(),
Time: timeStamp,
Hostname: opts.Host,
ParentSnapshot: *parentSnapshotID,

View File

@ -662,7 +662,7 @@ func TestBackupTags(t *testing.T) {
"expected no tags, got %v", newest.Tags)
parent := newest
opts.Tags = []string{"NL"}
opts.Tags = restic.TagLists{[]string{"NL"}}
testRunBackup(t, "", []string{env.testdata}, opts, env.gopts)
testRunCheck(t, env.gopts)
newest, _ = testRunSnapshots(t, env.gopts)