testutils

package
v0.0.0-...-3f44575 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

reference: os package

Functions

func Chmod

func Chmod(t *testing.T, ifs fsi.Fs, path string, perm os.FileMode)

func CountFiles

func CountFiles(t *testing.T, ifs fsi.Fs, path string, expectedFilesAndDirs int)

func CreateFile

func CreateFile(t *testing.T, fs fsi.Fs, path, content string)
func CreateSymlink(t *testing.T, ifs fsi.Fs, oldpath, newpath string)

func Exists

func Exists(ifs fsi.Fs, path string) (bool, error)

Check if a file or directory exists.

func FileMustContainText

func FileMustContainText(t *testing.T, fs fsi.Fs, path, content string)

func IterateDirTree

func IterateDirTree(f fsi.Fs, path string, visitor func(subdir string) error) (err error)

func LExists

func LExists(fs fsi.Fs, path string) (bool, error)

Check if a symlin, file or directory exists.

func ListFiles

func ListFiles(ifs fsi.Fs, dir string) ([]string, error)

func Mkdir

func Mkdir(t *testing.T, fs fsi.Fs, path string, perm os.FileMode) error

func MkdirAll

func MkdirAll(t *testing.T, fs fsi.Fs, path string, perm os.FileMode)

func ModeMustBeEqual

func ModeMustBeEqual(t *testing.T, a, b os.FileMode)

func MustExist

func MustExist(t *testing.T, fs fsi.Fs, path string)

func MustLExist

func MustLExist(t *testing.T, fs fsi.Fs, path string)

func MustNotExist

func MustNotExist(t *testing.T, fs fsi.Fs, path string)

func MustNotLExist

func MustNotLExist(t *testing.T, fs fsi.Fs, path string)

func OpenFile

func OpenFile(t *testing.T, fs fsi.Fs, path, content string, perm os.FileMode)

func RemoveAll

func RemoveAll(t *testing.T, fs fsi.Fs, path string)

func RemoveFile

func RemoveFile(t *testing.T, fs fsi.Fs, path string)

func SymlinkMustExist

func SymlinkMustExist(t *testing.T, ifs fsi.Fs, symlinkPath string)

func SymlinkMustExistWithTragetPath

func SymlinkMustExistWithTragetPath(t *testing.T, ifs fsi.Fs, symlinkPath, expectedPointsTo string)

func Walk

func Walk(fs fsi.Fs, root string, walkFn filepath.WalkFunc) error

Walk files

Types

This section is empty.

Jump to

Keyboard shortcuts

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