Documentation ¶
Index ¶
- func CreateFile(t *testing.T, pathPart ...string) (relPath string, absPath string)
- func CreatePath(t *testing.T, pathPart ...string) (relPath string, absPath string)
- func DynamicDataDir() string
- func DynamicDataDirAbs(t *testing.T) string
- func FixtureDataDir() string
- func FixturePath(t *testing.T, pathPart ...string) (relPath string, absPath string)
- func ResetTestdata(t *testing.T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFile ¶
CreateFile creates a file under DynamicDataDir() at a relative path built by joining the path parts.
All parts except the final one are assumed to be ancestor directrories (which are created if needed).
The file is created with 0600. Directories are created with 0700.
func CreatePath ¶
CreatePath returns a path under DynamicDataDir() at a relative path built by joining the path parts.
func DynamicDataDir ¶
func DynamicDataDir() string
func DynamicDataDirAbs ¶
func FixtureDataDir ¶
func FixtureDataDir() string
func FixturePath ¶
FixturePath returns a path under FixtureDataDir() at a relative path built by joining the path parts.
func ResetTestdata ¶
ResetTestdata removes all dynamic files/directories found in the conventional location.
If the conventional location does not exist, it makes it.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.