diff --git a/cmd/restic/integration_fuse_test.go b/cmd/restic/integration_fuse_test.go index 4dc725b16..107b1e831 100644 --- a/cmd/restic/integration_fuse_test.go +++ b/cmd/restic/integration_fuse_test.go @@ -9,6 +9,8 @@ import ( "testing" "time" + "bazil.org/fuse" + "github.com/restic/restic" "github.com/restic/restic/backend" "github.com/restic/restic/repository" @@ -62,6 +64,15 @@ func TestMount(t *testing.T) { go cmdMount(t, global, mountpoint, ready) <-ready + defer func() { + err := fuse.Unmount(mountpoint) + OK(t, err) + if TestCleanup { + err = os.RemoveAll(mountpoint) + OK(t, err) + } + }() + mountpointDir, err := os.Open(mountpoint) OK(t, err) names, err := mountpointDir.Readdirnames(-1)