From 1579d2a8ec058b889868e6680727e25ead3daac7 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Mon, 5 Oct 2020 23:19:22 +0200 Subject: [PATCH] Remove some unused assignments --- cmd/restic/integration_helpers_windows_test.go | 1 - cmd/restic/integration_test.go | 2 +- internal/archiver/archiver_test.go | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/restic/integration_helpers_windows_test.go b/cmd/restic/integration_helpers_windows_test.go index 85285efb7..f519a1494 100644 --- a/cmd/restic/integration_helpers_windows_test.go +++ b/cmd/restic/integration_helpers_windows_test.go @@ -44,7 +44,6 @@ func createFileSetPerHardlink(dir string) map[uint64][]string { } for i, f := range files { linkTests[uint64(i)] = append(linkTests[uint64(i)], f.Name()) - i++ } return linkTests } diff --git a/cmd/restic/integration_test.go b/cmd/restic/integration_test.go index c369f8881..284d03889 100644 --- a/cmd/restic/integration_test.go +++ b/cmd/restic/integration_test.go @@ -1590,7 +1590,7 @@ func TestDiff(t *testing.T) { rtest.OK(t, os.Mkdir(modfile+"4", 0755)) testRunBackup(t, "", []string{datadir}, opts, env.gopts) - snapshots, secondSnapshotID := lastSnapshot(snapshots, loadSnapshotMap(t, env.gopts)) + _, secondSnapshotID := lastSnapshot(snapshots, loadSnapshotMap(t, env.gopts)) _, err := testRunDiffOutput(env.gopts, "", secondSnapshotID) rtest.Assert(t, err != nil, "expected error on invalid snapshot id") diff --git a/internal/archiver/archiver_test.go b/internal/archiver/archiver_test.go index 643da5d24..e99a6c90e 100644 --- a/internal/archiver/archiver_test.go +++ b/internal/archiver/archiver_test.go @@ -2094,7 +2094,7 @@ func TestMetadataChanged(t *testing.T) { want.Group = "" // make another snapshot - snapshotID, node3 := snapshot(t, repo, fs, snapshotID, "testfile") + _, node3 := snapshot(t, repo, fs, snapshotID, "testfile") // Override username and group to empty string - in case underlying system has user with UID 51234 // See https://github.com/restic/restic/issues/2372 node3.User = ""