Documentation ¶
Index ¶
- Constants
- Variables
- func AssertFsState(t *testing.T, rootfs, rootPath string, keywords []mtree.Keyword, ...)
- func WriteTestFileSystem(t *testing.T, testee fs.Writer) (tmpDir string, rootfs string)
- type ExpandingWriterMock
- type SourceMock
- type SourceOverlayMock
- type TestNode
- type WriterMock
- func (s *WriterMock) Device(path string, a fs.DeviceAttrs) error
- func (s *WriterMock) Dir(path, name string, a fs.FileAttrs) error
- func (s *WriterMock) Fifo(path string, a fs.DeviceAttrs) error
- func (s *WriterMock) File(path string, src fs.FileSource) (fs.Source, error)
- func (s *WriterMock) Lazy(path, name string, src fs.LazySource, _ map[fs.Source]string) error
- func (s *WriterMock) Link(path, target string) error
- func (s *WriterMock) LowerLink(path, target string, a *fs.NodeAttrs) error
- func (s *WriterMock) LowerNode(path, name string, a *fs.NodeAttrs) error
- func (w *WriterMock) Mkdir(dir string) error
- func (w *WriterMock) Parent() error
- func (s *WriterMock) Remove(path string) error
- func (s *WriterMock) Symlink(path string, a fs.FileAttrs) error
Constants ¶
View Source
const ExpectedTestfsState = `` /* 2455-byte string literal not displayed */
Variables ¶
View Source
var ( MtreeTestkeywords = []mtree.Keyword{ "type", "uid", "gid", "mode", "link", "nlink", "xattr", } MtreeTestkeywordsWithTarTime = append(MtreeTestkeywords, "tar_time") )
Functions ¶
func AssertFsState ¶
Types ¶
type ExpandingWriterMock ¶
type ExpandingWriterMock struct {
*WriterMock
}
func (*ExpandingWriterMock) Lazy ¶
func (s *ExpandingWriterMock) Lazy(path, name string, src fs.LazySource, written map[fs.Source]string) error
type SourceMock ¶
func NewSourceMock ¶
func (*SourceMock) Attrs ¶
func (s *SourceMock) Attrs() fs.NodeInfo
func (*SourceMock) DeriveAttrs ¶
func (s *SourceMock) DeriveAttrs() (fs.DerivedAttrs, error)
func (*SourceMock) HashIfAvailable ¶
func (s *SourceMock) HashIfAvailable() string
func (*SourceMock) String ¶
func (s *SourceMock) String() string
type SourceOverlayMock ¶
type SourceOverlayMock struct {
*SourceMock
}
func (*SourceOverlayMock) String ¶
func (s *SourceOverlayMock) String() string
type WriterMock ¶
type WriterMock struct { Written []string WrittenPaths map[string]bool Nodes []string // contains filtered or unexported fields }
func MockWrites ¶
func MockWrites(t *testing.T, f TestNode) *WriterMock
func NewWriterMock ¶
func NewWriterMock(t *testing.T, attrs fs.AttrSet) *WriterMock
func (*WriterMock) Device ¶
func (s *WriterMock) Device(path string, a fs.DeviceAttrs) error
func (*WriterMock) Fifo ¶
func (s *WriterMock) Fifo(path string, a fs.DeviceAttrs) error
func (*WriterMock) File ¶
func (s *WriterMock) File(path string, src fs.FileSource) (fs.Source, error)
func (*WriterMock) Lazy ¶
func (s *WriterMock) Lazy(path, name string, src fs.LazySource, _ map[fs.Source]string) error
func (*WriterMock) Link ¶
func (s *WriterMock) Link(path, target string) error
func (*WriterMock) LowerLink ¶
func (s *WriterMock) LowerLink(path, target string, a *fs.NodeAttrs) error
func (*WriterMock) LowerNode ¶
func (s *WriterMock) LowerNode(path, name string, a *fs.NodeAttrs) error
func (*WriterMock) Mkdir ¶
func (w *WriterMock) Mkdir(dir string) error
func (*WriterMock) Parent ¶
func (w *WriterMock) Parent() error
func (*WriterMock) Remove ¶
func (s *WriterMock) Remove(path string) error
Click to show internal directories.
Click to hide internal directories.