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

Function TestLoadConfigNonexistent

cli/mcp/mcp_test.go:245–254  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

243}
244
245func TestLoadConfigNonexistent(t *testing.T) {
246 m := NewManager(testLogger())
247 err := m.LoadConfig("/nonexistent/path/mcp_servers.json")
248 if err != nil {
249 t.Errorf("nonexistent config should not error, got: %v", err)
250 }
251 if len(m.servers) != 0 {
252 t.Error("expected no servers loaded")
253 }
254}
255
256func TestLoadConfigValid(t *testing.T) {
257 dir := t.TempDir()

Callers

nothing calls this directly

Calls 5

LoadConfigMethod · 0.95
ErrorfMethod · 0.80
NewManagerFunction · 0.70
testLoggerFunction · 0.70
ErrorMethod · 0.65

Tested by

no test coverage detected