MCPcopy Create free account
hub / github.com/codehamr/codehamr / TestResolvedKeyPassesLiteralThrough

Function TestResolvedKeyPassesLiteralThrough

internal/config/config_test.go:680–685  ·  view source on GitHub ↗

TestResolvedKeyPassesLiteralThrough: a plaintext key with no $-references must pass through unchanged so existing configs keep working.

(t *testing.T)

Source from the content-addressed store, hash-verified

678 cdir := filepath.Join(dir, DirName)
679 if err := os.MkdirAll(cdir, 0o700); err != nil {
680 t.Fatal(err)
681 }
682 cfgPath := filepath.Join(cdir, "config.yaml")
683 // World readable file an older codehamr would have written.
684 loose := []byte("active: local\nmodels:\n local:\n llm: m\n url: http://x\n key: \"\"\n context_size: 1\n")
685 if err := os.WriteFile(cfgPath, loose, 0o644); err != nil {
686 t.Fatal(err)
687 }
688 cfg, _, err := Bootstrap(dir)

Callers

nothing calls this directly

Calls 1

ResolvedKeyMethod · 0.95

Tested by

no test coverage detected