MCPcopy Create free account
hub / github.com/astercloud/aster / createTestConfig

Function createTestConfig

pkg/core/pool_test.go:47–60  ·  view source on GitHub ↗

创建测试用的 AgentConfig 辅助函数

(agentID string)

Source from the content-addressed store, hash-verified

45
46// 创建测试用的 AgentConfig 辅助函数
47func 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
63func TestPool_Create(t *testing.T) {

Callers 15

TestRoom_JoinAndLeaveFunction · 0.85
TestRoom_JoinDuplicateFunction · 0.85
TestRoom_GetMembersFunction · 0.85
TestRoom_SayFunction · 0.85
TestRoom_BroadcastFunction · 0.85
TestRoom_SendToFunction · 0.85
TestRoom_ClearHistoryFunction · 0.85
TestPool_CreateFunction · 0.85
TestPool_CreateDuplicateFunction · 0.85
TestPool_MaxCapacityFunction · 0.85
TestPool_ListFunction · 0.85
TestPool_RemoveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected