tests

package
v0.0.0-...-bb8472d Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ReadFileBase64 = "" /* 2412-byte string literal not displayed */
View Source
const YamlConfigStub = `` /* 614-byte string literal not displayed */

Variables

View Source
var ExpectedGlob = []string{"foo", "bar"}

Functions

func GetFileSystemMock

func GetFileSystemMock(t *testing.T) any

Types

type FileSystem

type FileSystem struct {
	mock.Mock
}

FileSystem is an autogenerated mock type for the FileSystem type

func NewFileSystem

func NewFileSystem(t mockConstructorTestingTNewFileSystem) *FileSystem

NewFileSystem creates a new instance of FileSystem. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*FileSystem) FileExists

func (_m *FileSystem) FileExists(filename string) bool

FileExists provides a mock function with given fields: filename

func (*FileSystem) Getwd

func (_m *FileSystem) Getwd() (string, error)

Getwd provides a mock function with given fields:

func (*FileSystem) Glob

func (_m *FileSystem) Glob(path string) ([]string, error)

Glob provides a mock function with given fields: path

func (*FileSystem) ReadFile

func (_m *FileSystem) ReadFile(name string) ([]byte, error)

ReadFile provides a mock function with given fields: name

func (*FileSystem) Remove

func (_m *FileSystem) Remove(name string) error

Remove provides a mock function with given fields: name

func (*FileSystem) Stat

func (_m *FileSystem) Stat(name string) (fs.FileInfo, error)

Stat provides a mock function with given fields: name

func (*FileSystem) TempDir

func (_m *FileSystem) TempDir() string

TempDir provides a mock function with given fields:

func (*FileSystem) WriteFile

func (_m *FileSystem) WriteFile(name string, data []byte, perm fs.FileMode) error

WriteFile provides a mock function with given fields: name, data, perm

type MemFileInfo

type MemFileInfo struct {
	Mtime time.Time
}

func (MemFileInfo) IsDir

func (fi MemFileInfo) IsDir() bool

func (MemFileInfo) ModTime

func (fi MemFileInfo) ModTime() time.Time

func (MemFileInfo) Mode

func (fi MemFileInfo) Mode() fs.FileMode

func (MemFileInfo) Name

func (fi MemFileInfo) Name() string

func (MemFileInfo) Size

func (fi MemFileInfo) Size() int64

func (MemFileInfo) Sys

func (fi MemFileInfo) Sys() any

type Process

type Process struct {
	mock.Mock
}

Process is an autogenerated mock type for the Process type

func NewProcess

func NewProcess(t mockConstructorTestingTNewProcess) *Process

NewProcess creates a new instance of Process. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Process) Execute

func (_m *Process) Execute(name string, args ...string) ([]byte, error)

Execute provides a mock function with given fields: name, args

func (*Process) Exit

func (_m *Process) Exit(code int)

Exit provides a mock function with given fields: code

func (*Process) Fprint

func (_m *Process) Fprint(w io.Writer, a ...interface{}) (int, error)

Fprint provides a mock function with given fields: w, a

Jump to

Keyboard shortcuts

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