Documentation ¶
Overview ¶
Package testenv contains testing helpers for creating test harnesses and other common tasks.
Index ¶
- func DockerAvailable() error
- func FakeExecPlanCompiler() func(context.Context, string, ...string) *exec.Cmd
- func FakePlanCompiler()
- func GitBare(t testing.TB, p string)
- func GitClone(t testing.TB, cloneURL, p string)
- func GitCommitAllPush(t testing.TB, repoPath, message string)
- func Mkdirs(t testing.TB, mode fs.FileMode, dirs ...string)
- func Path(paths ...string) string
- func ReadFile(t testing.TB, p string) string
- func RemoveOnSuccess(t testing.TB, tmpdir string)
- func RequireEnv(t testing.TB, envs ...string)
- func TempDir(t testing.TB, pat string) string
- func TempPlanDir(t testing.TB, fixtureDir string) string
- func WriteFile(t testing.TB, p, body string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DockerAvailable ¶
func DockerAvailable() error
func FakeExecPlanCompiler ¶
func FakePlanCompiler ¶
func FakePlanCompiler()
FakePlanCompiler is a fake implementation of polyester that can be used in unit tests by calling in a test function to allow for compilation of shell plans by writing a script that calls the test into $PATH.
func GitCommitAllPush ¶
func RemoveOnSuccess ¶
func RequireEnv ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.