test(drive): improve coverage for vote poll query modules#3445
Conversation
…nversions Add 61 unit tests across 5 vote query modules covering real logic paths: - vote_poll_vote_state_query: TryFrom<i32> conversion, FinalizedResult conversion edge cases, construct_path_query for all result types (Documents, VoteTally, DocumentsAndVoteTally, SingleDocumentByContender), offset/limit propagation, start_at included/excluded, conditional subqueries for stored info / lock / abstain keys - vote_polls_by_end_date_query: construct_path_query for all 9 time bound combinations, path_query_for_end_time_included, and path_query_for_single_end_time - contested_resource_votes_given_by_identity_query: construct_path_query for ascending/descending with all start_at variants, offset/limit, identity_id path verification - vote_poll_contestant_votes_query: construct_path_query for all direction/start_at combinations using DPNS contract fixture - vote_polls_by_document_type_query: resolve_with_provided_borrowed_contract success/failure, construct_path_query_with_known_index for all start_at/direction combinations, result_is_in_key, result_path_index, index name validation, too-many-start-values error Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughFour files in the query module received comprehensive Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
⏳ Review in progress (commit 57b1098) |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## v3.1-dev #3445 +/- ##
============================================
+ Coverage 81.17% 81.26% +0.08%
============================================
Files 2852 2852
Lines 290349 291502 +1153
============================================
+ Hits 235700 236891 +1191
+ Misses 54649 54611 -38
🚀 New features to boost your workflow:
|
Summary
Adds 61 tests across 5 vote/query files in rs-drive, covering path query construction, TryFrom conversions, and result handling.
vote_poll_vote_state_query.rsvote_polls_by_end_date_query.rscontested_resource_votes_given_by_identity_query.rsvote_poll_contestant_votes_query.rsvote_polls_by_document_type_query.rsTest plan
cargo test -p drive --libpassescargo fmt --allclean🤖 Generated with Claude Code
Summary by CodeRabbit