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

Function TestChatMemoryActive_RequiresStore

cli/chat_memory_test.go:30–43  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

28}
29
30func TestChatMemoryActive_RequiresStore(t *testing.T) {
31 t.Setenv(chatMemoryEnvVar, "true")
32 if (&ChatCLI{}).chatMemoryActive() {
33 t.Error("no memory store must mean inactive")
34 }
35 cli := &ChatCLI{memoryStore: workspace.NewMemoryStore(t.TempDir(), zap.NewNop())}
36 if !cli.chatMemoryActive() {
37 t.Error("live memory store must activate the exception")
38 }
39 t.Setenv(chatMemoryEnvVar, "false")
40 if cli.chatMemoryActive() {
41 t.Error("env off must win over a live store")
42 }
43}
44
45func TestMemoryToolDefinition_Schema(t *testing.T) {
46 def := memoryToolDefinition()

Callers

nothing calls this directly

Calls 3

chatMemoryActiveMethod · 0.95
NewMemoryStoreFunction · 0.92
ErrorMethod · 0.65

Tested by

no test coverage detected