file

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2019 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFile

func CreateFile(t *testing.T, pathPart ...string) (relPath string, absPath string)

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

func CreatePath(t *testing.T, pathPart ...string) (relPath string, absPath string)

CreatePath returns a path under DynamicDataDir() at a relative path built by joining the path parts.

func DynamicDataDir

func DynamicDataDir() string

func DynamicDataDirAbs

func DynamicDataDirAbs(t *testing.T) string

func FixtureDataDir

func FixtureDataDir() string

func FixturePath

func FixturePath(t *testing.T, pathPart ...string) (relPath string, absPath string)

FixturePath returns a path under FixtureDataDir() at a relative path built by joining the path parts.

func ResetTestdata

func ResetTestdata(t *testing.T)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL