(t *testing.T)
| 14 | ) |
| 15 | |
| 16 | func TestAgentCreate(t *testing.T) { |
| 17 | deps := setupTestDeps(t) |
| 18 | |
| 19 | config := &types.AgentConfig{ |
| 20 | TemplateID: "test-template", |
| 21 | ModelConfig: &types.ModelConfig{ |
| 22 | Provider: "anthropic", |
| 23 | Model: "claude-sonnet-4-5", |
| 24 | APIKey: "test-key", |
| 25 | }, |
| 26 | Sandbox: &types.SandboxConfig{ |
| 27 | Kind: types.SandboxKindMock, |
| 28 | WorkDir: "/tmp/test", |
| 29 | }, |
| 30 | } |
| 31 | |
| 32 | ag, err := Create(context.Background(), config, deps) |
| 33 | if err != nil { |
| 34 | t.Fatalf("Failed to create agent: %v", err) |
| 35 | } |
| 36 | defer func() { _ = ag.Close() }() |
| 37 | |
| 38 | if ag.ID() == "" { |
| 39 | t.Error("Agent ID should not be empty") |
| 40 | } |
| 41 | |
| 42 | if ag.state != types.AgentStateReady { |
| 43 | t.Errorf("Expected state Ready, got %s", ag.state) |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | func TestAgentStatus(t *testing.T) { |
| 48 | deps := setupTestDeps(t) |
nothing calls this directly
no test coverage detected