Documentation
¶
Overview ¶
Package testenv keeps test binaries away from the developer's real moa configuration. A package that can reach pkg/core calls Run from TestMain.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertNotProtected ¶
AssertNotProtected stops a test that was pointed at the real config by an environment variable before it reads or writes there.
func Check ¶
func Check(path string)
Check panics when path is, or is inside, a config location the harness protects.
func Run ¶
Run replaces HOME, XDG_CONFIG_HOME and MOA_CONFIG_DIR with a private sandbox, makes core refuse to resolve any config path inside the incoming HOME or MOA_CONFIG_DIR, runs the tests and removes the sandbox. The environment is not restored afterwards: work that outlives a test stays sandboxed too.
Types ¶
This section is empty.