From c204382ea96a57f3ed474bd142cd6e86b660c9dc Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 10 Jun 2018 00:01:28 +0200 Subject: [PATCH] Revert "Fix integration tests on Windows" This reverts commit 33dbd0ba5c17b5c3ec64033d8d74094e7c51d288. --- cmd/restic/integration_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/restic/integration_test.go b/cmd/restic/integration_test.go index c16097b97..8ccf28b1e 100644 --- a/cmd/restic/integration_test.go +++ b/cmd/restic/integration_test.go @@ -387,23 +387,23 @@ func TestBackupExclude(t *testing.T) { testRunBackup(t, filepath.Dir(env.testdata), []string{"testdata"}, opts, env.gopts) snapshots, snapshotID := lastSnapshot(snapshots, loadSnapshotMap(t, env.gopts)) files := testRunLs(t, env.gopts, snapshotID) - rtest.Assert(t, includes(files, "/testdata/foo.tar.gz"), + rtest.Assert(t, includes(files, filepath.Join(string(filepath.Separator), "testdata", "foo.tar.gz")), "expected file %q in first snapshot, but it's not included", "foo.tar.gz") opts.Excludes = []string{"*.tar.gz"} testRunBackup(t, filepath.Dir(env.testdata), []string{"testdata"}, opts, env.gopts) snapshots, snapshotID = lastSnapshot(snapshots, loadSnapshotMap(t, env.gopts)) files = testRunLs(t, env.gopts, snapshotID) - rtest.Assert(t, !includes(files, "/testdata/foo.tar.gz"), + rtest.Assert(t, !includes(files, filepath.Join(string(filepath.Separator), "testdata", "foo.tar.gz")), "expected file %q not in first snapshot, but it's included", "foo.tar.gz") opts.Excludes = []string{"*.tar.gz", "private/secret"} testRunBackup(t, filepath.Dir(env.testdata), []string{"testdata"}, opts, env.gopts) _, snapshotID = lastSnapshot(snapshots, loadSnapshotMap(t, env.gopts)) files = testRunLs(t, env.gopts, snapshotID) - rtest.Assert(t, !includes(files, "/testdata/foo.tar.gz"), + rtest.Assert(t, !includes(files, filepath.Join(string(filepath.Separator), "testdata", "foo.tar.gz")), "expected file %q not in first snapshot, but it's included", "foo.tar.gz") - rtest.Assert(t, !includes(files, "/testdata/private/secret/passwords.txt"), + rtest.Assert(t, !includes(files, filepath.Join(string(filepath.Separator), "testdata", "private", "secret", "passwords.txt")), "expected file %q not in first snapshot, but it's included", "passwords.txt") }