MCPcopy Index your code
hub / github.com/codehamr/codehamr / TestResolvedKeyUnsetEnvYieldsEmpty

Function TestResolvedKeyUnsetEnvYieldsEmpty

internal/config/config_test.go:689–695  ·  view source on GitHub ↗

TestResolvedKeyUnsetEnvYieldsEmpty: ${VAR} with VAR unset expands to "", matching the "no key" branch (keyless local Ollama) without a panic.

(t *testing.T)

Source from the content-addressed store, hash-verified

687// TestResolvedKeyUnsetEnvYieldsEmpty: ${VAR} with VAR unset expands to "",
688// matching the "no key" branch (keyless local Ollama) without a panic.
689func 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

Callers

nothing calls this directly

Calls 1

ResolvedKeyMethod · 0.95

Tested by

no test coverage detected