(t *testing.T)
| 45 | } |
| 46 | |
| 47 | func TestAgentStatus(t *testing.T) { |
| 48 | deps := setupTestDeps(t) |
| 49 | |
| 50 | config := &types.AgentConfig{ |
| 51 | TemplateID: "test-template", |
| 52 | ModelConfig: &types.ModelConfig{ |
| 53 | Provider: "anthropic", |
| 54 | Model: "claude-sonnet-4-5", |
| 55 | APIKey: "test-key", |
| 56 | }, |
| 57 | Sandbox: &types.SandboxConfig{ |
| 58 | Kind: types.SandboxKindMock, |
| 59 | WorkDir: "/tmp/test", |
| 60 | }, |
| 61 | } |
| 62 | |
| 63 | ag, err := Create(context.Background(), config, deps) |
| 64 | if err != nil { |
| 65 | t.Fatalf("Failed to create agent: %v", err) |
| 66 | } |
| 67 | defer func() { _ = ag.Close() }() |
| 68 | |
| 69 | status := ag.Status() |
| 70 | if status == nil { |
| 71 | t.Fatal("Status should not be nil") |
| 72 | } |
| 73 | |
| 74 | if status.AgentID != ag.ID() { |
| 75 | t.Errorf("Expected AgentID %s, got %s", ag.ID(), status.AgentID) |
| 76 | } |
| 77 | |
| 78 | if status.State != types.AgentStateReady { |
| 79 | t.Errorf("Expected state Ready, got %s", status.State) |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | func TestAgentEventBus(t *testing.T) { |
| 84 | deps := setupTestDeps(t) |
nothing calls this directly
no test coverage detected