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

Function TestNewTimeoutCmd_Sleep

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

Source from the content-addressed store, hash-verified

9)
10
11func TestNewTimeoutCmd_Sleep(t *testing.T) {
12 var cmd = executils.NewTimeoutCmd(1*time.Second, "sleep", "3")
13 cmd.WithStdout()
14 cmd.WithStderr()
15 err := cmd.Run()
16 t.Log("error:", err)
17 t.Log("stdout:", cmd.Stdout())
18 t.Log("stderr:", cmd.Stderr())
19}
20
21func TestNewTimeoutCmd_Echo(t *testing.T) {
22 var cmd = executils.NewTimeoutCmd(10*time.Second, "echo", "-n", "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