TestSessionReset tests RESET command
(t *testing.T)
| 288 | |
| 289 | // TestSessionReset tests RESET command |
| 290 | func TestSessionReset(t *testing.T) { |
| 291 | db := testHarness.DuckgresDB |
| 292 | |
| 293 | // Save original search_path — RESET search_path passes through to DuckDB |
| 294 | // and would reset to DuckDB default (just "main"), losing the ducklake prefix |
| 295 | var originalPath string |
| 296 | if err := db.QueryRow("SHOW search_path").Scan(&originalPath); err != nil { |
| 297 | t.Fatalf("SHOW search_path (before) failed: %v", err) |
| 298 | } |
| 299 | t.Cleanup(func() { |
| 300 | _, _ = db.Exec("SET search_path TO '" + originalPath + "'") |
| 301 | }) |
| 302 | tests := []QueryTest{ |
| 303 | { |
| 304 | Name: "reset_search_path", |
| 305 | Query: "RESET search_path", |
| 306 | DuckgresOnly: true, |
| 307 | }, |
| 308 | { |
| 309 | Name: "reset_all", |
| 310 | Query: "RESET ALL", |
| 311 | DuckgresOnly: true, |
| 312 | }, |
| 313 | } |
| 314 | runQueryTests(t, tests) |
| 315 | } |
| 316 | |
| 317 | // TestSessionCurrentFunctions tests current_* functions |
| 318 | func TestSessionCurrentFunctions(t *testing.T) { |
nothing calls this directly
no test coverage detected