测试 MCP 客户端连接
(t *testing.T)
| 9 | |
| 10 | // 测试 MCP 客户端连接 |
| 11 | func 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 | |
| 19 | func TestTools(t *testing.T) { |
| 20 | t.Run("currentTime", func(t *testing.T) { |