From 9a4796594a51a6318697fef44de5e13ac8a53d7c Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sat, 22 Aug 2020 20:45:22 +0200 Subject: [PATCH] integration tests: Fix checking of wrong snapshot --- cmd/restic/integration_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/restic/integration_test.go b/cmd/restic/integration_test.go index 36ce9e487..74661ca1c 100644 --- a/cmd/restic/integration_test.go +++ b/cmd/restic/integration_test.go @@ -313,7 +313,7 @@ func TestBackup(t *testing.T) { for i, snapshotID := range snapshotIDs { restoredir := filepath.Join(env.base, fmt.Sprintf("restore%d", i)) t.Logf("restoring snapshot %v to %v", snapshotID.Str(), restoredir) - testRunRestore(t, env.gopts, restoredir, snapshotIDs[0]) + testRunRestore(t, env.gopts, restoredir, snapshotID) diff := directoriesContentsDiff(env.testdata, filepath.Join(restoredir, "testdata")) rtest.Assert(t, diff == "", "directories are not equal: %v", diff) } @@ -1390,7 +1390,7 @@ func TestHardLink(t *testing.T) { for i, snapshotID := range snapshotIDs { restoredir := filepath.Join(env.base, fmt.Sprintf("restore%d", i)) t.Logf("restoring snapshot %v to %v", snapshotID.Str(), restoredir) - testRunRestore(t, env.gopts, restoredir, snapshotIDs[0]) + testRunRestore(t, env.gopts, restoredir, snapshotID) diff := directoriesContentsDiff(env.testdata, filepath.Join(restoredir, "testdata")) rtest.Assert(t, diff == "", "directories are not equal %v", diff)