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

Function TestAPITool_DefaultOutputSchema

pkg/tools/builtin/api/api_test.go:158–172  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

156}
157
158func TestAPITool_DefaultOutputSchema(t *testing.T) {
159 t.Parallel()
160
161 tool := New(latest.APIToolConfig{
162 Name: "default-schema",
163 Method: http.MethodGet,
164 Endpoint: "https://example.com/api",
165 }, testExpander())
166
167 toolsList, err := tool.Tools(t.Context())
168 require.NoError(t, err)
169 require.Len(t, toolsList, 1)
170
171 assert.Equal(t, tools.MustSchemaFor[string](), toolsList[0].OutputSchema)
172}
173
174func TestAPITool_CustomOutputSchema(t *testing.T) {
175 t.Parallel()

Callers

nothing calls this directly

Calls 5

testExpanderFunction · 0.85
ContextMethod · 0.80
NewFunction · 0.70
ToolsMethod · 0.65
LenMethod · 0.65

Tested by

no test coverage detected