Versions in this module Expand all Collapse all v0 v0.0.2 Aug 14, 2019 v0.0.1 Aug 14, 2019 Changes in this version + type FakeCmdCallback func() + type FakeCmdResult struct + Error error + ExitStatus int + Stderr string + Stdout string + Sticky bool + type FakeCmdRunner struct + AvailableCommands map[string]bool + CommandExistsValue bool + RunCommands [][]string + RunCommandsQuietly [][]string + RunCommandsWithInput [][]string + RunComplexCommands []boshsys.Command + func NewFakeCmdRunner() *FakeCmdRunner + func (r *FakeCmdRunner) AddCmdResult(fullCmd string, result FakeCmdResult) + func (r *FakeCmdRunner) AddProcess(fullCmd string, process *FakeProcess) + func (r *FakeCmdRunner) CommandExists(cmdName string) bool + func (r *FakeCmdRunner) RunCommand(cmdName string, args ...string) (string, string, int, error) + func (r *FakeCmdRunner) RunCommandQuietly(cmdName string, args ...string) (string, string, int, error) + func (r *FakeCmdRunner) RunCommandWithInput(input, cmdName string, args ...string) (string, string, int, error) + func (r *FakeCmdRunner) RunComplexCommand(cmd boshsys.Command) (string, string, int, error) + func (r *FakeCmdRunner) RunComplexCommandAsync(cmd boshsys.Command) (boshsys.Process, error) + func (r *FakeCmdRunner) SetCmdCallback(fullCmd string, callback FakeCmdCallback) + type FakeFile struct + CloseErr error + Contents []byte + ReadAtErr error + ReadErr error + StatErr error + Stats *FakeFileStats + WriteErr error + func NewFakeFile(path string, fs *FakeFileSystem) *FakeFile + func (f *FakeFile) Close() error + func (f *FakeFile) Name() string + func (f *FakeFile) Read(b []byte) (int, error) + func (f *FakeFile) ReadAt(b []byte, offset int64) (int, error) + func (f *FakeFile) Seek(int64, int) (int64, error) + func (f *FakeFile) Write(contents []byte) (int, error) + func (f *FakeFile) WriteAt(b []byte, offset int64) (int, error) + func (f FakeFile) Stat() (os.FileInfo, error) + type FakeFileInfo struct + func (fi FakeFileInfo) IsDir() bool + func (fi FakeFileInfo) ModTime() time.Time + func (fi FakeFileInfo) Mode() os.FileMode + func (fi FakeFileInfo) Size() int64 + type FakeFileRegistry struct + func NewFakeFileRegistry() *FakeFileRegistry + func (ffr *FakeFileRegistry) Get(path string) *FakeFile + func (ffr *FakeFileRegistry) Register(path string, file *FakeFile) + func (ffr *FakeFileRegistry) UnifiedPath(path string) string + type FakeFileStats struct + Content []byte + FileMode os.FileMode + FileType FakeFileType + Flags int + Groupname string + ModTime time.Time + Open bool + SymlinkTarget string + Username string + func (stats FakeFileStats) StringContents() string + type FakeFileStatsRegistry struct + func NewFakeFileStatsRegistry() *FakeFileStatsRegistry + func (fsr *FakeFileStatsRegistry) Get(path string) *FakeFileStats + func (fsr *FakeFileStatsRegistry) GetAll() map[string]*FakeFileStats + func (fsr *FakeFileStatsRegistry) Register(path string, stats *FakeFileStats) + func (fsr *FakeFileStatsRegistry) Remove(path string) + func (fsr *FakeFileStatsRegistry) UnifiedPath(path string) string + type FakeFileSystem struct + ChangeTempRootErr error + ChmodCallCount int + ChmodErr error + ChownCallCount int + ChownErr error + CopyDirError error + CopyFileCallCount int + CopyFileError error + ExpandPathErr error + ExpandPathExpanded string + ExpandPathPath string + GlobErr error + GlobErrs map[string]error + GlobStub globFn + HomeDirHomePath string + HomeDirUsername string + MkdirAllCallCount int + MkdirAllError error + OpenFileErr error + ReadAndFollowLinkError error + ReadFileError error + ReadFileWithOptsCallCount int + ReadlinkError error + RemoveAllStub removeAllFn + RenameError error + RenameNewPaths []string + RenameOldPaths []string + ReturnTempFile boshsys.File + ReturnTempFiles []boshsys.File + ReturnTempFilesByPrefix map[string]boshsys.File + StatCallCount int + StatWithOptsCallCount int + SymlinkError error + TempDirDir string + TempDirDirs []string + TempDirError error + TempFileError error + TempFileErrorsByPrefix map[string]error + TempRootPath string + WalkErr error + WriteFileCallCount int + WriteFileError error + WriteFileErrors map[string]error + WriteFileQuietlyCallCount int + func NewFakeFileSystem() *FakeFileSystem + func (fs *FakeFileSystem) ChangeTempRoot(tempRootPath string) error + func (fs *FakeFileSystem) Chmod(path string, perm os.FileMode) error + func (fs *FakeFileSystem) Chown(path, username string) error + func (fs *FakeFileSystem) ConvergeFileContents(path string, content []byte, opts ...boshsys.ConvergeFileContentsOpts) (bool, error) + func (fs *FakeFileSystem) CopyDir(srcPath, dstPath string) error + func (fs *FakeFileSystem) CopyFile(srcPath, dstPath string) error + func (fs *FakeFileSystem) EnableStrictTempRootBehavior() + func (fs *FakeFileSystem) ExpandPath(path string) (string, error) + func (fs *FakeFileSystem) FileExists(path string) bool + func (fs *FakeFileSystem) FindFileStats(path string) (*FakeFileStats, error) + func (fs *FakeFileSystem) GetFileTestStat(path string) *FakeFileStats + func (fs *FakeFileSystem) Glob(pattern string) (matches []string, err error) + func (fs *FakeFileSystem) HomeDir(username string) (string, error) + func (fs *FakeFileSystem) Lstat(path string) (os.FileInfo, error) + func (fs *FakeFileSystem) MkdirAll(path string, perm os.FileMode) error + func (fs *FakeFileSystem) OpenFile(path string, flag int, perm os.FileMode) (boshsys.File, error) + func (fs *FakeFileSystem) ReadAndFollowLink(symlinkPath string) (string, error) + func (fs *FakeFileSystem) ReadFile(path string) ([]byte, error) + func (fs *FakeFileSystem) ReadFileString(path string) (string, error) + func (fs *FakeFileSystem) ReadFileWithOpts(path string, opts boshsys.ReadOpts) ([]byte, error) + func (fs *FakeFileSystem) Readlink(symlinkPath string) (string, error) + func (fs *FakeFileSystem) RecursiveGlob(pattern string) (matches []string, err error) + func (fs *FakeFileSystem) RegisterMkdirAllError(path string, err error) + func (fs *FakeFileSystem) RegisterOpenFile(path string, file *FakeFile) + func (fs *FakeFileSystem) RegisterReadFileError(path string, err error) + func (fs *FakeFileSystem) RemoveAll(path string) error + func (fs *FakeFileSystem) Rename(oldPath, newPath string) error + func (fs *FakeFileSystem) SetGlob(pattern string, matches ...[]string) + func (fs *FakeFileSystem) Stat(path string) (os.FileInfo, error) + func (fs *FakeFileSystem) StatHelper(path string) (os.FileInfo, error) + func (fs *FakeFileSystem) StatWithOpts(path string, opts boshsys.StatOpts) (os.FileInfo, error) + func (fs *FakeFileSystem) Symlink(oldPath, newPath string) (err error) + func (fs *FakeFileSystem) TempDir(prefix string) (string, error) + func (fs *FakeFileSystem) TempFile(prefix string) (file boshsys.File, err error) + func (fs *FakeFileSystem) UnregisterReadFileError(path string) + func (fs *FakeFileSystem) Walk(root string, walkFunc filepath.WalkFunc) error + func (fs *FakeFileSystem) WriteFile(path string, content []byte) error + func (fs *FakeFileSystem) WriteFileQuietly(path string, content []byte) error + func (fs *FakeFileSystem) WriteFileString(path, content string) error + type FakeFileType string + const FakeFileTypeDir + const FakeFileTypeFile + const FakeFileTypeSymlink + type FakeProcess struct + StartErr error + Stderr io.Writer + Stdout io.Writer + TerminateNicelyErr error + TerminateNicelyKillGracePeriod time.Duration + TerminatedNicely bool + TerminatedNicelyCallBack func(*FakeProcess) + WaitCh chan boshsys.Result + WaitResult boshsys.Result + Waited bool + func (p *FakeProcess) TerminateNicely(killGracePeriod time.Duration) error + func (p *FakeProcess) Wait() <-chan boshsys.Result