test

package
v6.0.0-...-06ff513 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicMock

type BasicMock struct {
	CreateArgs   []string
	OpenArgs     []string
	OpenFileArgs [][3]interface{}
	StatArgs     []string
	RenameArgs   [][2]string
	RemoveArgs   []string
	JoinArgs     [][]string
}

func (*BasicMock) Create

func (fs *BasicMock) Create(filename string) (billy.File, error)

func (*BasicMock) Join

func (fs *BasicMock) Join(elem ...string) string

func (*BasicMock) Open

func (fs *BasicMock) Open(filename string) (billy.File, error)

func (*BasicMock) OpenFile

func (fs *BasicMock) OpenFile(filename string, flag int, mode fs.FileMode) (billy.File, error)

func (*BasicMock) Remove

func (fs *BasicMock) Remove(filename string) error

func (*BasicMock) Rename

func (fs *BasicMock) Rename(target, link string) error

func (*BasicMock) Stat

func (fs *BasicMock) Stat(filename string) (os.FileInfo, error)

type DirMock

type DirMock struct {
	BasicMock
	ReadDirArgs  []string
	MkdirAllArgs [][2]interface{}
}

func (*DirMock) MkdirAll

func (fs *DirMock) MkdirAll(filename string, perm fs.FileMode) error

func (*DirMock) ReadDir

func (fs *DirMock) ReadDir(path string) ([]os.FileInfo, error)

type FileMock

type FileMock struct {
	bytes.Buffer
	// contains filtered or unexported fields
}

func (*FileMock) Close

func (*FileMock) Close() error

func (*FileMock) Lock

func (*FileMock) Lock() error

func (*FileMock) Name

func (f *FileMock) Name() string

func (*FileMock) ReadAt

func (*FileMock) ReadAt(_ []byte, _ int64) (int, error)

func (*FileMock) Seek

func (*FileMock) Seek(_ int64, _ int) (int64, error)

func (*FileMock) Stat

func (*FileMock) Stat() (fs.FileInfo, error)

func (*FileMock) Truncate

func (*FileMock) Truncate(_ int64) error

func (*FileMock) Unlock

func (*FileMock) Unlock() error

func (*FileMock) WriteAt

func (*FileMock) WriteAt(_ []byte, _ int64) (int, error)

type NoLockCapFs

type NoLockCapFs struct {
	BasicMock
}

func (*NoLockCapFs) Capabilities

func (o *NoLockCapFs) Capabilities() billy.Capability

type OnlyReadCapFs

type OnlyReadCapFs struct {
	BasicMock
}

func (*OnlyReadCapFs) Capabilities

func (o *OnlyReadCapFs) Capabilities() billy.Capability

type SymlinkMock

type SymlinkMock struct {
	BasicMock
	LstatArgs    []string
	SymlinkArgs  [][2]string
	ReadlinkArgs []string
}

func (*SymlinkMock) Lstat

func (fs *SymlinkMock) Lstat(filename string) (os.FileInfo, error)
func (fs *SymlinkMock) Readlink(link string) (string, error)
func (fs *SymlinkMock) Symlink(target, link string) error

type TempFileMock

type TempFileMock struct {
	BasicMock
	TempFileArgs [][2]string
}

func (*TempFileMock) TempFile

func (fs *TempFileMock) TempFile(dir, prefix string) (billy.File, error)

Jump to

Keyboard shortcuts

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