mount: enable debug logging for the flaky TestMount test

The test case fails from time to time with an Input/Output error while
trying to access the snapshots directory.
This commit is contained in:
Michael Eischer
2023-05-01 18:03:17 +02:00
parent 8d971172c4
commit 1cb11ad8ad
2 changed files with 29 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ import (
"testing"
"time"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/repository"
"github.com/restic/restic/internal/restic"
rtest "github.com/restic/restic/internal/test"
@@ -159,6 +160,11 @@ func TestMount(t *testing.T) {
t.Skip("Skipping fuse tests")
}
debugEnabled := debug.TestLogToStderr(t)
if debugEnabled {
defer debug.TestDisableLog(t)
}
env, cleanup := withTestEnvironment(t)
// must list snapshots more than once
env.gopts.backendTestHook = nil