Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpDir ¶
DumpDir prints the contents of the directory to the testing logger.
Use this in a defer statement from a test that may allocate and exercise a temporary directory. Immensely useful for sanity checking and debugging failing tests.
One should still test that contents are as expected. This is only a visual tool to assist when things don't go your way.
func DumpDirOnFailure ¶ added in v1.1.0
DumpDirOnFailure prints the contents of the directory to the testing logger if the test has failed.
func NewLoopback ¶
NewLoopback creates a loopback device, and returns its device name (/dev/loopX), and its clean-up function.
func RequiresRoot ¶
RequiresRoot skips tests that require root, unless the test.root flag has been set
func RequiresRootM ¶
func RequiresRootM()
RequiresRootM is similar to RequiresRoot but intended to be called from *testing.M.
Types ¶
This section is empty.