MCPcopy
hub / github.com/docker/docker-agent / TestShellTool_HandlerEcho

Function TestShellTool_HandlerEcho

pkg/tools/builtin/shell/shell_test.go:35–45  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

33}
34
35func TestShellTool_HandlerEcho(t *testing.T) {
36 t.Parallel()
37 tool := New(nil, &config.RuntimeConfig{Config: config.Config{WorkingDir: t.TempDir()}})
38
39 result, err := tool.handler.RunShell(t.Context(), RunShellArgs{
40 Cmd: "echo 'hello world'",
41 Cwd: "",
42 })
43 require.NoError(t, err)
44 assert.Contains(t, result.Output, "hello world")
45}
46
47func TestShellTool_HandlerWithCwd(t *testing.T) {
48 t.Parallel()

Callers

nothing calls this directly

Calls 3

RunShellMethod · 0.80
ContextMethod · 0.80
NewFunction · 0.70

Tested by

no test coverage detected