fakeSubAgentClient implements SubAgentClient for testing purposes.
| 379 | |
| 380 | // fakeSubAgentClient implements SubAgentClient for testing purposes. |
| 381 | type fakeSubAgentClient struct { |
| 382 | logger slog.Logger |
| 383 | |
| 384 | mu sync.Mutex // Protects following. |
| 385 | agents map[uuid.UUID]agentcontainers.SubAgent |
| 386 | |
| 387 | listErrC chan error // If set, send to return error, close to return nil. |
| 388 | created []agentcontainers.SubAgent |
| 389 | createErrC chan error // If set, send to return error, close to return nil. |
| 390 | deleted []uuid.UUID |
| 391 | deleteErrC chan error // If set, send to return error, close to return nil. |
| 392 | } |
| 393 | |
| 394 | func (m *fakeSubAgentClient) List(ctx context.Context) ([]agentcontainers.SubAgent, error) { |
| 395 | if m.listErrC != nil { |
nothing calls this directly
no outgoing calls
no test coverage detected