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

Function TestQuerySourceStartupOption

server/query_source_test.go:47–52  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
50func 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

Callers

nothing calls this directly

Calls 1

ParseStartupOptionsFunction · 0.85

Tested by

no test coverage detected