(t *testing.T)
| 441 | warns = append(warns, msg) |
| 442 | }) |
| 443 | |
| 444 | // Invalid format should be cleared (falls back to auto-detection) |
| 445 | if resolved.Server.MemoryLimit != "" { |
| 446 | t.Fatalf("expected empty memory_limit after invalid input, got %q", resolved.Server.MemoryLimit) |
| 447 | } |
| 448 | |
| 449 | found := false |
| 450 | for _, w := range warns { |
| 451 | if strings.Contains(w, "Invalid memory_limit format") { |
| 452 | found = true |
| 453 | break |
| 454 | } |
| 455 | } |
| 456 | if !found { |
| 457 | t.Fatalf("expected warning about invalid memory_limit format, warnings: %v", warns) |
| 458 | } |
| 459 | } |
| 460 | |
| 461 | func TestResolveEffectiveConfigMemoryBudgetAndWorkers(t *testing.T) { |
| 462 | retireTrue := true |
| 463 | // YAML only |
| 464 | fileCfg := &FileConfig{ |
| 465 | MemoryBudget: "24GB", |
| 466 | Process: ProcessFileConfig{ |
| 467 | MinWorkers: 2, |
| 468 | MaxWorkers: 10, |
| 469 | RetireOnSessionEnd: &retireTrue, |
| 470 | }, |
nothing calls this directly
no test coverage detected