Documentation
¶
Overview ¶
Package testutil holds helpers shared by tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FakeBins ¶
FakeBins puts fake executables at the front of PATH for the duration of the test and returns the directory holding them. Each map key is an executable name and each value is the body of a POSIX shell script. Tests that use it are skipped on Windows.
The rest of the real PATH is kept after the fake directory, so anything the fake scripts need beyond externalTools still resolves normally, but any directory that itself provides a real protectedBinaries entry is dropped from it. Without this, a test that omits e.g. "docker" from scripts to simulate it being entirely absent can be defeated by a real docker sitting in a directory that was only kept on PATH for basic tools.
Types ¶
This section is empty.