MCPcopy Create free account
hub / github.com/PostHog/duckgres / TestFallbackInvalidSyntax

Function TestFallbackInvalidSyntax

tests/integration/fallback_test.go:149–172  ·  view source on GitHub ↗

TestFallbackInvalidSyntax tests that truly invalid syntax still returns errors

(t *testing.T)

Source from the content-addressed store, hash-verified

147
148// TestFallbackInvalidSyntax tests that truly invalid syntax still returns errors
149func TestFallbackInvalidSyntax(t *testing.T) {
150 tests := []QueryTest{
151 // Completely invalid syntax should fail
152 {
153 Name: "gibberish",
154 Query: "BLAHBLAH NOTASYNTAX 123",
155 DuckgresOnly: true,
156 ExpectError: true,
157 },
158 {
159 Name: "incomplete_select",
160 Query: "SELECT FROM WHERE",
161 DuckgresOnly: true,
162 ExpectError: true,
163 },
164 {
165 Name: "invalid_keyword_order",
166 Query: "FROM ORDER BY GROUP",
167 DuckgresOnly: true,
168 ExpectError: true,
169 },
170 }
171 runQueryTests(t, tests)
172}
173
174// TestFallbackWithValidPostgreSQL ensures valid PostgreSQL still goes through
175// the normal transpilation path (no fallback)

Callers

nothing calls this directly

Calls 1

runQueryTestsFunction · 0.85

Tested by

no test coverage detected