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

Function TestLoadBootstrapContent_GlobalFallback

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

Source from the content-addressed store, hash-verified

48}
49
50func TestLoadBootstrapContent_GlobalFallback(t *testing.T) {
51 workspace := t.TempDir()
52 global := t.TempDir()
53 _ = os.WriteFile(filepath.Join(global, "USER.md"), []byte("global user"), 0o644)
54
55 bl := NewBootstrapLoader(workspace, global, testLogger())
56 content, ok := bl.LoadFile("USER.md")
57 if !ok {
58 t.Fatal("expected to find USER.md from global")
59 }
60 if content != "global user" {
61 t.Errorf("expected 'global user', got %q", content)
62 }
63}
64
65func TestLoadBootstrapContent_MissingFiles(t *testing.T) {
66 bl := NewBootstrapLoader(t.TempDir(), t.TempDir(), testLogger())

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