miroir/crates
jedarden 1523cae5de test(miroir-core): cover reshard executor source doc-count helper (bf-1s9od)
Add the executor-level seam missing from bf-14wgq: mockito-driven unit tests
for `ReshardExecutor::compute_source_document_count`, which delegates to the
shared `index_stats::aggregate_index_stats`. The pure reduction policy is
already covered directly; these exercise the real reqwest transport against
`/indexes/{uid}/stats` on mock nodes returning known per-node counts:

  (a)  multiple healthy nodes with differing counts → result is the max,
      not the sum (each address hosts a full replica);
  (b)  one node returning HTTP 5xx → logged and skipped, max of the rest;
  (b') a node 404-ing (absent replica) → counts as zero, not a failure;
  (c)  every node failing → denominator falls back to 0.

Adds `mockito = "1"` as a miroir-core dev-dependency, mirroring how the
miroir-proxy ILM acceptance tests drive the same endpoint. Test-only change;
no production code modified.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-09 09:19:09 -04:00
..
miroir-core test(miroir-core): cover reshard executor source doc-count helper (bf-1s9od) 2026-07-09 09:19:09 -04:00
miroir-ctl feat(explain): display IncompleteIntegration warnings in CLI 2026-05-26 21:03:36 -04:00
miroir-proxy fix(ci): enable kafka-sink feature in CI build and Dockerfile 2026-05-31 12:08:39 -04:00