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

Function TestSessionCurrentFunctions

tests/integration/session_test.go:318–347  ·  view source on GitHub ↗

TestSessionCurrentFunctions tests current_* functions

(t *testing.T)

Source from the content-addressed store, hash-verified

316
317// TestSessionCurrentFunctions tests current_* functions
318func TestSessionCurrentFunctions(t *testing.T) {
319 tests := []QueryTest{
320 {
321 Name: "current_database",
322 Query: "SELECT current_database() IS NOT NULL",
323 DuckgresOnly: true,
324 },
325 {
326 Name: "current_schema",
327 Query: "SELECT current_schema() IS NOT NULL",
328 DuckgresOnly: true,
329 },
330 {
331 Name: "current_user",
332 Query: "SELECT current_user IS NOT NULL",
333 DuckgresOnly: true,
334 },
335 {
336 Name: "session_user",
337 Query: "SELECT session_user IS NOT NULL",
338 DuckgresOnly: true,
339 },
340 {
341 Name: "current_setting",
342 Query: "SELECT current_setting('server_version') IS NOT NULL",
343 DuckgresOnly: true,
344 },
345 }
346 runQueryTests(t, tests)
347}
348
349// TestSessionMiscCommands tests miscellaneous session commands
350func TestSessionMiscCommands(t *testing.T) {

Callers

nothing calls this directly

Calls 1

runQueryTestsFunction · 0.85

Tested by

no test coverage detected