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

Function TestShellTool_HandlerError

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

Source from the content-addressed store, hash-verified

161}
162
163func TestShellTool_HandlerError(t *testing.T) {
164 t.Parallel()
165 tool := New(nil, &config.RuntimeConfig{Config: config.Config{WorkingDir: t.TempDir()}})
166
167 result, err := tool.handler.RunShell(t.Context(), RunShellArgs{
168 Cmd: "command_that_does_not_exist",
169 Cwd: "",
170 })
171 require.NoError(t, err, "Handler should not return an error")
172 assert.Contains(t, result.Output, "Error executing command")
173}
174
175func TestShellTool_OutputSchema(t *testing.T) {
176 t.Parallel()

Callers

nothing calls this directly

Calls 3

RunShellMethod · 0.80
ContextMethod · 0.80
NewFunction · 0.70

Tested by

no test coverage detected