From 51cd1c847b1f5a006d6e8fbcd4656a2989f34266 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Thu, 31 Oct 2024 21:59:53 +0100 Subject: [PATCH] backup: log error if test backup fails --- cmd/restic/cmd_backup_integration_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/restic/cmd_backup_integration_test.go b/cmd/restic/cmd_backup_integration_test.go index b692cad87..71367b236 100644 --- a/cmd/restic/cmd_backup_integration_test.go +++ b/cmd/restic/cmd_backup_integration_test.go @@ -31,7 +31,7 @@ func testRunBackupAssumeFailure(t testing.TB, dir string, target []string, opts func testRunBackup(t testing.TB, dir string, target []string, opts BackupOptions, gopts GlobalOptions) { err := testRunBackupAssumeFailure(t, dir, target, opts, gopts) - rtest.Assert(t, err == nil, "Error while backing up") + rtest.Assert(t, err == nil, "Error while backing up: %v", err) } func TestBackup(t *testing.T) { @@ -95,7 +95,7 @@ func testBackup(t *testing.T, useFsSnapshot bool) { func toPathInSnapshot(path string) string { // use path as is on most platforms, but convert it on windows if runtime.GOOS == "windows" { - // the path generate by the test is always local so take the shortcut + // the path generated by the test is always local so take the shortcut vol := filepath.VolumeName(path) if vol[len(vol)-1] != ':' { panic(fmt.Sprintf("unexpected path: %q", path))