创建测试用的 AgentConfig 辅助函数
(agentID string)
| 45 | |
| 46 | // 创建测试用的 AgentConfig 辅助函数 |
| 47 | func createTestConfig(agentID string) *types.AgentConfig { |
| 48 | return &types.AgentConfig{ |
| 49 | AgentID: agentID, |
| 50 | TemplateID: "test-template", |
| 51 | ModelConfig: &types.ModelConfig{ |
| 52 | Provider: "anthropic", |
| 53 | Model: "claude-sonnet-4-5", |
| 54 | APIKey: "sk-test-key-for-unit-tests", // 固定测试 key |
| 55 | }, |
| 56 | Sandbox: &types.SandboxConfig{ |
| 57 | Kind: types.SandboxKindMock, |
| 58 | }, |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | // TestPool_Create 测试创建 Agent |
| 63 | func TestPool_Create(t *testing.T) { |
no outgoing calls
no test coverage detected