TestQuerySourceStartupOption asserts a `-c duckgres.query_source=...` startup option is parsed into the map ParseStartupOptions returns (the value the startup handler applies to the session).
(t *testing.T)
| 45 | // session by applyStartupQuerySource, with the same validation as SET: |
| 46 | // canonical values (case-insensitively, normalized to lowercase) are applied, |
| 47 | // anything else is a 22023 error the startup handler turns into a FATAL |
| 48 | // connection rejection — matching resolveWorkerProfile's handling of invalid |
| 49 | // duckgres.worker_* startup options. |
| 50 | func TestQuerySourceStartupOption(t *testing.T) { |
| 51 | opts := ParseStartupOptions("-c duckgres.query_source=endpoints") |
| 52 | if got := opts[querySourceGUCName]; got != "endpoints" { |
| 53 | t.Fatalf("ParseStartupOptions[%q] = %q, want %q", querySourceGUCName, got, "endpoints") |
| 54 | } |
| 55 |
nothing calls this directly
no test coverage detected