kubernetes/pkg/kubelet/container/testing/os.go

type FakeOS

// Mkdir is a fake call that just returns nil.
func (f *FakeOS) MkdirAll(path string, perm os.FileMode) error {}

// Symlink is a fake call that just returns nil.
func (f *FakeOS) Symlink(oldname string, newname string) error {}

// Stat is a fake that returns an error
func (f *FakeOS) Stat(path string) (os.FileInfo, error) {}

// Remove is a fake call that returns nil.
func (f *FakeOS) Remove(path string) error {}

// RemoveAll is a fake call that just returns nil.
func (f *FakeOS) RemoveAll(path string) error {}

// Create is a fake call that creates a virtual file and returns nil.
func (f *FakeOS) Create(path string) (*os.File, error) {}

// Chmod is a fake call that returns nil.
func (*FakeOS) Chmod(path string, perm os.FileMode) error {}

// Hostname is a fake call that returns nil.
func (f *FakeOS) Hostname() (name string, err error) {}

// Chtimes is a fake call that returns nil.
func (*FakeOS) Chtimes(path string, atime time.Time, mtime time.Time) error {}

// Pipe is a fake call that returns nil.
func (*FakeOS) Pipe() (r *os.File, w *os.File, err error) {}

// ReadDir is a fake call that returns the files under the directory.
func (f *FakeOS) ReadDir(dirname string) ([]os.DirEntry, error) {}

// Glob is a fake call that returns list of virtual files matching a pattern.
func (f *FakeOS) Glob(pattern string) ([]string, error) {}

// Open is a fake call that returns nil.
func (*FakeOS) Open(name string) (*os.File, error) {}

// OpenFile is a fake call that return nil.
func (*FakeOS) OpenFile(name string, flag int, perm os.FileMode) (*os.File, error) {}

// Rename is a fake call that return nil.
func (*FakeOS) Rename(oldpath, newpath string) error {}