MCPcopy
hub / github.com/influxdata/telegraf / TestRunError

Function TestRunError

internal/internal_test.go:138–147  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

136}
137
138func TestRunError(t *testing.T) {
139 shell, err := exec.LookPath("sh")
140 if err != nil || shell == "" {
141 t.Skip("'sh' binary not available on OS, skipping.")
142 }
143 cmd := exec.Command(shell, "-c", "false")
144 err = RunTimeout(cmd, time.Second)
145
146 require.Error(t, err)
147}
148
149func TestRandomSleep(t *testing.T) {
150 // TODO: Fix this test

Callers

nothing calls this directly

Calls 2

RunTimeoutFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…