test(drive): add coverage for fee calculation engine#3429
Conversation
Add 65 tests for rs-drive/src/fees/op.rs covering: - BaseOp::cost() for all opcode categories - HashFunction block_size/rounds/block_cost/base_cost for all 4 variants - FunctionOp::new_with_byte_count block and round calculations - FunctionOp::cost saturating arithmetic - operation_cost() all 4 match arms including error paths - combine_cost_operations() filtering and summing - grovedb_operations_batch partitioning and consume variants - DriveCost::ephemeral_cost() with overflow error handling Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 11 minutes and 16 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
✨ Finishing Touches🧪 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 GateCommit:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v3.1-dev #3429 +/- ##
============================================
+ Coverage 80.22% 80.26% +0.03%
============================================
Files 2855 2855
Lines 281685 282623 +938
============================================
+ Hits 225983 226842 +859
- Misses 55702 55781 +79
🚀 New features to boost your workflow:
|
Fixes cargo-machete CI failure. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
cde29c6 to
b0f456f
Compare
Summary
Adds 65 tests for
rs-drive/src/fees/op.rs— the core fee calculation engine — which previously had 0 test coverage.Test plan
cargo test -p drive --lib -- fees::op— 65 passedcargo fmt --allclean🤖 Generated with Claude Code