MCPcopy Create free account
hub / github.com/go-task/task / TestExitImmediately

Function TestExitImmediately

task_test.go:2158–2174  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2156}
2157
2158func TestExitImmediately(t *testing.T) {
2159 t.Parallel()
2160
2161 const dir = "testdata/exit_immediately"
2162
2163 var buff bytes.Buffer
2164 e := task.NewExecutor(
2165 task.WithDir(dir),
2166 task.WithStdout(&buff),
2167 task.WithStderr(&buff),
2168 task.WithSilent(true),
2169 )
2170 require.NoError(t, e.Setup())
2171
2172 require.Error(t, e.Run(t.Context(), &task.Call{Task: "default"}))
2173 assert.Contains(t, buff.String(), `"this_should_fail": executable file not found in $PATH`)
2174}
2175
2176func TestRunOnlyRunsJobsHashOnce(t *testing.T) {
2177 t.Parallel()

Callers

nothing calls this directly

Calls 4

SetupMethod · 0.95
RunMethod · 0.95
ErrorMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…