(t *testing.T)
| 213 | } |
| 214 | |
| 215 | func TestProtocol_CallTool_LintSQL(t *testing.T) { |
| 216 | c := newInProcessClient(t) |
| 217 | ctx := context.Background() |
| 218 | |
| 219 | req := mcpmcp.CallToolRequest{} |
| 220 | req.Params.Name = "lint_sql" |
| 221 | req.Params.Arguments = map[string]any{"sql": "select id from users \n"} |
| 222 | |
| 223 | result, err := c.CallTool(ctx, req) |
| 224 | if err != nil { |
| 225 | t.Fatalf("CallTool lint_sql: %v", err) |
| 226 | } |
| 227 | |
| 228 | data := extractProtocolResult(t, result) |
| 229 | count, ok := data["violation_count"].(float64) |
| 230 | if !ok || count == 0 { |
| 231 | t.Error("expected lint violations for trailing whitespace / keyword case") |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | func TestProtocol_CallTool_AnalyzeSQL(t *testing.T) { |
| 236 | c := newInProcessClient(t) |
nothing calls this directly
no test coverage detected