(t *testing.T)
| 561 | var warns []string |
| 562 | resolved := configresolve.ResolveEffective(nil, configresolve.CLIInputs{}, envFromMap(env), func(msg string) { |
| 563 | warns = append(warns, msg) |
| 564 | }) |
| 565 | |
| 566 | if resolved.ProcessMinWorkers != 0 { |
| 567 | t.Fatalf("expected default process.min_workers, got %d", resolved.ProcessMinWorkers) |
| 568 | } |
| 569 | if resolved.ProcessMaxWorkers != 0 { |
| 570 | t.Fatalf("expected default process.max_workers, got %d", resolved.ProcessMaxWorkers) |
| 571 | } |
| 572 | if resolved.ProcessRetireOnSessionEnd { |
| 573 | t.Fatal("expected default process.retire_on_session_end") |
| 574 | } |
| 575 | |
| 576 | wantWarnings := []string{ |
| 577 | "Invalid DUCKGRES_PROCESS_MIN_WORKERS", |
| 578 | "Invalid DUCKGRES_PROCESS_MAX_WORKERS", |
| 579 | "Invalid DUCKGRES_PROCESS_RETIRE_ON_SESSION_END", |
| 580 | } |
| 581 | for _, w := range wantWarnings { |
| 582 | found := false |
| 583 | for _, got := range warns { |
| 584 | if strings.Contains(got, w) { |
| 585 | found = true |
| 586 | break |
| 587 | } |
| 588 | } |
| 589 | if !found { |
| 590 | t.Fatalf("expected warning containing %q, warnings: %v", w, warns) |
nothing calls this directly
no test coverage detected