tfstest

package
v1.54.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2026 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package tfstest provides a shared test suite for torrentfs Backend implementations (e.g. hanwen-torrentfs, og-torrentfs).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunTestSuite

func RunTestSuite(t *testing.T, mount MountFunc)

RunTestSuite runs the full torrentfs integration test suite using the provided mount function. Call it from a Test* function in the backend repo:

func TestTorrentFS(t *testing.T) {
    torrentfstest.RunTestSuite(t, myMountFunc)
}

Types

type MountFunc

type MountFunc func(t testing.TB, tfs *torrentfs.TorrentFS, mountDir string) (unmount func())

MountFunc mounts tfs at mountDir and returns a cleanup/unmount function. If FUSE is unavailable the implementation should call t.Skip.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址