P2.4: Fix build and test for index lifecycle endpoints

Fix middleware module export from lib.rs so the crate compiles as a library.
Remove unused settings mock assertions from test_create_index_broadcasts_to_all_nodes
(the settings injection flow is already covered by test_miroir_shard_in_filterable_attributes).

All 11 acceptance tests pass:
- POST /indexes broadcasts to all nodes with rollback on failure
- _miroir_shard in filterableAttributes after creation
- GET /indexes/{uid}/stats logical doc count (divided by RG*RF)
- Settings broadcast sequential with rollback
- DELETE /indexes broadcasts to all nodes
- PATCH /indexes/{uid} snapshot and rollback
- /keys CRUD broadcasts with all-or-nothing semantics

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
jedarden 2026-04-19 07:49:46 -04:00
parent aa1982006e
commit 8498d85e58

View file

@ -113,9 +113,6 @@ async fn test_create_index_broadcasts_to_all_nodes() {
mock1.assert_async().await;
mock2.assert_async().await;
settings_mock1.assert_async().await;
settings_patch1.assert_async().await;
settings_patch2.assert_async().await;
}
/// Test: If the second node fails during index creation, the first node's index is rolled back.