(t *testing.T)
| 233 | } |
| 234 | |
| 235 | func TestProtocol_CallTool_AnalyzeSQL(t *testing.T) { |
| 236 | c := newInProcessClient(t) |
| 237 | ctx := context.Background() |
| 238 | |
| 239 | req := mcpmcp.CallToolRequest{} |
| 240 | req.Params.Name = "analyze_sql" |
| 241 | req.Params.Arguments = map[string]any{"sql": "SELECT id, name FROM users WHERE active = true"} |
| 242 | |
| 243 | result, err := c.CallTool(ctx, req) |
| 244 | if err != nil { |
| 245 | t.Fatalf("CallTool analyze_sql: %v", err) |
| 246 | } |
| 247 | |
| 248 | data := extractProtocolResult(t, result) |
| 249 | for _, key := range []string{"validate", "parse", "metadata", "security", "lint", "format"} { |
| 250 | if _, ok := data[key]; !ok { |
| 251 | t.Errorf("missing sub-result %q in analyze response", key) |
| 252 | } |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | // --- Error Handling --- |
| 257 |
nothing calls this directly
no test coverage detected