Tests cover the worker-handler surface that runs without a live filer or S3 server: pure helpers (clusterS3Endpoints, readString), Capability/Descriptor sanity, and the Detect input-validation / skip-activity / proposal paths driven by a recorder sender. recordingSender captures everything the handl
| 21 | // recordingSender captures everything the handler sends so each Detect |
| 22 | // case can assert on activities, proposals, and completion. |
| 23 | type recordingSender struct { |
| 24 | proposals []*plugin_pb.DetectionProposals |
| 25 | completes []*plugin_pb.DetectionComplete |
| 26 | activities []*plugin_pb.ActivityEvent |
| 27 | // errOn forces the named send to fail; lets tests cover the |
| 28 | // SendComplete error-propagation path without a full transport stub. |
| 29 | errOn map[string]error |
| 30 | } |
| 31 | |
| 32 | func (r *recordingSender) SendProposals(p *plugin_pb.DetectionProposals) error { |
| 33 | if err := r.errOn["proposals"]; err != nil { |
nothing calls this directly
no outgoing calls
no test coverage detected