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

Function TestResolveEffectiveConfigInvalidMemoryBudget

main_test.go:563–587  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 2

ResolveEffectiveFunction · 0.92
envFromMapFunction · 0.85

Tested by

no test coverage detected