Documentation
¶
Overview ¶
Package wfstest implements support for testing implementations and users of file systems.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestRenameFS ¶ added in v0.4.1
TestRenameFS tests a wfs.RenameFS implementation. It assumes the filesystem also implements wfs.WriteFileFS so it can stage source files. tmpDir is a directory the test may freely create and destroy entries under.
func TestWriteFileFS ¶
TestWriteFileFS tests a wfs.WriteFileFS implementation.
Typical usage inside a test is:
tmpDir, err := os.MkdirTemp("", "test")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(tmpDir)
fsys := osfs.New(filepath.Dir(tmpDir))
if err := wfstest.TestWriteFileFS(fsys, filepath.Base(tmpDir)); err != nil {
t.Fatal(err)
}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.