MCPcopy Index your code
hub / github.com/docker/docker-agent / TestNewHandler_EmptyArguments

Function TestNewHandler_EmptyArguments

pkg/tools/tools_test.go:37–54  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

35}
36
37func TestNewHandler_EmptyArguments(t *testing.T) {
38 t.Parallel()
39
40 handler := NewHandler(func(_ context.Context, _ map[string]any) (*ToolCallResult, error) {
41 return ResultSuccess("ok"), nil
42 })
43
44 result, err := handler(t.Context(), ToolCall{
45 ID: "call_1",
46 Type: "function",
47 Function: FunctionCall{
48 Name: "get_memories",
49 Arguments: "",
50 },
51 })
52 require.NoError(t, err)
53 assert.Equal(t, "ok", result.Output)
54}
55
56func TestNewHandler_EmptyObjectArguments(t *testing.T) {
57 t.Parallel()

Callers

nothing calls this directly

Calls 3

ResultSuccessFunction · 0.85
ContextMethod · 0.80
NewHandlerFunction · 0.70

Tested by

no test coverage detected