MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TestNewTimeoutCmd_Echo

Function TestNewTimeoutCmd_Echo

internal/utils/exec/cmd_test.go:21–29  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19}
20
21func TestNewTimeoutCmd_Echo(t *testing.T) {
22 var cmd = executils.NewTimeoutCmd(10*time.Second, "echo", "-n", "hello")
23 cmd.WithStdout()
24 cmd.WithStderr()
25 err := cmd.Run()
26 t.Log("error:", err)
27 t.Log("stdout:", cmd.Stdout())
28 t.Log("stderr:", cmd.Stderr())
29}
30
31func TestNewTimeoutCmd_Echo2(t *testing.T) {
32 var cmd = executils.NewCmd("echo", "hello")

Callers

nothing calls this directly

Calls 6

WithStdoutMethod · 0.80
WithStderrMethod · 0.80
LogMethod · 0.80
StdoutMethod · 0.80
StderrMethod · 0.80
RunMethod · 0.45

Tested by

no test coverage detected