rsynctest

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructLargeDataFile

func ConstructLargeDataFile(headPattern, bodyPattern, endPattern []byte) []byte

func CreateDummyDeviceFiles

func CreateDummyDeviceFiles(t *testing.T, dir string)

func DataFileMatches

func DataFileMatches(fn string, headPattern, bodyPattern, endPattern []byte) error

func InteropModule

func InteropModule(path string) []rsyncd.Module

InteropModule is a convenience function to define an rsync module named “interop” with the specified path.

func RsyncVersion

func RsyncVersion(t *testing.T) string

func VerifyDummyDeviceFiles

func VerifyDummyDeviceFiles(t *testing.T, source, dest string)

func WriteLargeDataFile

func WriteLargeDataFile(t *testing.T, source string, headPattern, bodyPattern, endPattern []byte)

Types

type Option

type Option func(ts *TestServer)

func Listener

func Listener(ln net.Listener) Option

func Listeners

func Listeners(lns []rsyncdconfig.Listener) Option

type TestServer

type TestServer struct {

	// Port is the port on which the test server is listening on. Useful to pass
	// to rsync’s --port option.
	Port string
	// contains filtered or unexported fields
}

func New

func New(t *testing.T, modules []rsyncd.Module, opts ...Option) *TestServer

Jump to

Keyboard shortcuts

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