MCPcopy Create free account
hub / github.com/diillson/chatcli / TestLoadBootstrapContent_Priority

Function TestLoadBootstrapContent_Priority

cli/workspace/bootstrap_test.go:34–48  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

32}
33
34func TestLoadBootstrapContent_Priority(t *testing.T) {
35 workspace := t.TempDir()
36 global := t.TempDir()
37 _ = os.WriteFile(filepath.Join(workspace, "SOUL.md"), []byte("workspace soul"), 0o644)
38 _ = os.WriteFile(filepath.Join(global, "SOUL.md"), []byte("global soul"), 0o644)
39
40 bl := NewBootstrapLoader(workspace, global, testLogger())
41 content, ok := bl.LoadFile("SOUL.md")
42 if !ok {
43 t.Fatal("expected to find SOUL.md")
44 }
45 if content != "workspace soul" {
46 t.Errorf("expected workspace to override global, got %q", content)
47 }
48}
49
50func TestLoadBootstrapContent_GlobalFallback(t *testing.T) {
51 workspace := t.TempDir()

Callers

nothing calls this directly

Calls 4

LoadFileMethod · 0.95
NewBootstrapLoaderFunction · 0.85
ErrorfMethod · 0.80
testLoggerFunction · 0.70

Tested by

no test coverage detected