Documentation
¶
Overview ¶
Package testtree snapshots a directory tree in memory and restores it elsewhere. A test fixture that is expensive to build (a git repository takes a dozen processes) is built once and copied per test.
It is test support: production code never imports it (a test in internal/repodocs enforces that), and it imports neither internal/kb nor the testing package, so the tests of internal/kb can use it too.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
// Path is relative to the captured root, slash-separated.
Path string
// Mode carries the permission bits only.
Mode fs.FileMode
// Dir is true for a directory; Data is then nil.
Dir bool
Data []byte
}
Entry is one directory or regular file of a Tree.