TestActiveProfileResolvesByName: the helper returns the right struct.
(t *testing.T)
| 463 | |
| 464 | // TestActiveProfileResolvesByName: the helper returns the right struct. |
| 465 | func TestActiveProfileResolvesByName(t *testing.T) { |
| 466 | cfg := &Config{ |
| 467 | Active: "b", |
| 468 | Models: map[string]*Profile{ |
| 469 | "a": {LLM: "m-a"}, |
| 470 | "b": {LLM: "m-b"}, |
| 471 | }, |
| 472 | } |
| 473 | if cfg.ActiveProfile().LLM != "m-b" { |
| 474 | t.Fatalf("ActiveProfile().LLM = %q, want m-b", cfg.ActiveProfile().LLM) |
| 475 | } |
| 476 | } |
| 477 | |
| 478 | // TestBootstrapCoercesUnknownActive: an unknown `active:` is coerced to the |
| 479 | // first profile in sorted order so ActiveProfile never returns nil. |
nothing calls this directly
no test coverage detected