MCPcopy Create free account
hub / github.com/bytebase/bytebase / TestFormatCallOutput

Function TestFormatCallOutput

backend/api/mcp/tool_call_test.go:9–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestFormatCallOutput(t *testing.T) {
10 endpoint := &EndpointInfo{
11 OperationID: "test.Operation",
12 Service: "TestService",
13 Method: "Test",
14 }
15
16 output := CallOutput{
17 Status: 200,
18 Response: map[string]any{"data": "test"},
19 }
20
21 result := formatCallOutput(output, endpoint)
22 require.Contains(t, result, "test.Operation")
23 require.Contains(t, result, "200 OK")
24 require.Contains(t, result, "\"data\"")
25}
26
27func TestFormatCallOutputError(t *testing.T) {
28 endpoint := &EndpointInfo{

Callers

nothing calls this directly

Calls 1

formatCallOutputFunction · 0.85

Tested by

no test coverage detected