MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / TestLintSQLInternal_CleanSQL

Function TestLintSQLInternal_CleanSQL

pkg/mcp/tools_internal_test.go:306–317  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

304}
305
306func TestLintSQLInternal_CleanSQL(t *testing.T) {
307 data, err := lintSQLInternal("SELECT id FROM users")
308 if err != nil {
309 t.Fatalf("unexpected error: %v", err)
310 }
311 if _, ok := data["violation_count"]; !ok {
312 t.Error("expected violation_count key")
313 }
314 if _, ok := data["violations"]; !ok {
315 t.Error("expected violations key")
316 }
317}
318
319func TestLintSQLInternal_WithViolations(t *testing.T) {
320 data, err := lintSQLInternal("select id from users \n")

Callers

nothing calls this directly

Calls 3

lintSQLInternalFunction · 0.85
FatalfMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected