TestResolvedKeyUnsetEnvYieldsEmpty: ${VAR} with VAR unset expands to "", matching the "no key" branch (keyless local Ollama) without a panic.
(t *testing.T)
| 687 | // TestResolvedKeyUnsetEnvYieldsEmpty: ${VAR} with VAR unset expands to "", |
| 688 | // matching the "no key" branch (keyless local Ollama) without a panic. |
| 689 | func TestResolvedKeyUnsetEnvYieldsEmpty(t *testing.T) { |
| 690 | os.Unsetenv("TEST_CODEHAMR_MISSING") |
| 691 | p := &Profile{Key: "${TEST_CODEHAMR_MISSING}"} |
| 692 | if got := p.ResolvedKey(); got != "" { |
| 693 | t.Fatalf("ResolvedKey() = %q, want empty for unset env var", got) |
| 694 | } |
| 695 | } |
| 696 | |
| 697 | // TestResolvedKeyLiteralDollarSurvives: expansion applies ONLY when the whole |
| 698 | // key is a ${VAR} reference. A literal proxy key containing '$' (llama.cpp |
nothing calls this directly
no test coverage detected