testsuite

package
v0.0.0-202406181927 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: Apache-2.0, MIT Imports: 14 Imported by: 0

Documentation

Overview

Package testsuite provides a integration testing suite for lisafs. These tests are intended for servers serving the local filesystem.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunAllLocalFSTests

func RunAllLocalFSTests(t *testing.T, tester Tester)

RunAllLocalFSTests runs all local FS tests as subtests.

func RunTest

func RunTest(t *testing.T, tester Tester, testName string, testFn TestFunc, mountPath string)

RunTest runs the passed test function as a subtest.

Types

type TestFunc

type TestFunc func(context.Context, *testing.T, Tester, lisafs.ClientFD)

TestFunc describes the signature of a test method.

type Tester

type Tester interface {
	// NewServer returns a new instance of the tester server.
	NewServer(t *testing.T) *lisafs.Server

	// LinkSupported returns true if the backing server supports LinkAt.
	LinkSupported() bool

	// SetUserGroupIDSupported returns true if the backing server supports
	// changing UID/GID for files.
	SetUserGroupIDSupported() bool

	// BindSupported returns true if the backing server supports BindAt.
	BindSupported() bool
}

Tester is the client code using this test suite. This interface abstracts away all the caller specific details.

Jump to

Keyboard shortcuts

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