fix test issue

This commit is contained in:
lxowalle 2026-03-13 16:32:48 +08:00
parent 084112e8e1
commit 0decb2241f

View file

@ -796,11 +796,7 @@ func TestProcessDirectWithChannel_TriggersMCPInitialization(t *testing.T) {
ToolConfig: config.ToolConfig{
Enabled: true,
},
Servers: map[string]config.MCPServerConfig{
"test-server": {
Enabled: true,
},
},
// No servers configured - manager should not be initialized
},
},
}
@ -825,8 +821,9 @@ func TestProcessDirectWithChannel_TriggersMCPInitialization(t *testing.T) {
t.Fatalf("ProcessDirectWithChannel failed: %v", err)
}
if !al.mcp.hasManager() {
t.Fatal("expected MCP manager to be initialized in direct agent mode")
// Manager should not be initialized when no servers are configured
if al.mcp.hasManager() {
t.Fatal("expected MCP manager to be nil when no servers are configured")
}
}