MCPcopy
hub / github.com/flipped-aurora/gin-vue-admin / TestMcpClientConnection

Function TestMcpClientConnection

server/mcp/client/client_test.go:11–17  ·  view source on GitHub ↗

测试 MCP 客户端连接

(t *testing.T)

Source from the content-addressed store, hash-verified

9
10// 测试 MCP 客户端连接
11func TestMcpClientConnection(t *testing.T) {
12 c, err := NewClient("http://localhost:8888/sse", "test-client", "1.0.0", "gin-vue-admin MCP服务")
13 defer c.Close()
14 if err != nil {
15 t.Fatalf(err.Error())
16 }
17}
18
19func TestTools(t *testing.T) {
20 t.Run("currentTime", func(t *testing.T) {

Callers

nothing calls this directly

Calls 2

NewClientFunction · 0.70
CloseMethod · 0.65

Tested by

no test coverage detected