package testutil
import "github.com/containerd/containerd/pkg/testutil"
Index ¶
- func DumpDir(t *testing.T, root string)
- func DumpDirOnFailure(t *testing.T, root string)
- func RequiresRoot(t testing.TB)
- func RequiresRootM()
- func Unmount(t testing.TB, mountPoint string)
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 ¶
DumpDirOnFailure prints the contents of the directory to the testing logger if the test has failed.
func RequiresRoot ¶
RequiresRoot does nothing on Windows
func RequiresRootM ¶
func RequiresRootM()
RequiresRootM is similar to RequiresRoot but intended to be called from *testing.M.
func Unmount ¶
Unmount unmounts a given mountPoint and sets t.Error if it fails
Source Files ¶
- Version
- v1.7.20
- Published
- Jul 18, 2024
- Platform
- windows/amd64
- Imports
- 8 packages
- Last checked
- 11 minutes ago –
Tools for package owners.