test: adjust rewards related test to give provider earning#1326
Conversation
Time Submission Status
You can submit time with the command. Example: See available commands to help comply with our Guidelines. |
📝 WalkthroughWalkthroughThis PR enhances test coverage and refactors test infrastructure: it adds a specific error message assertion for malformed ABI detection in one test, and refactors another test to isolate data-provider operations using a dedicated engine context throughout the settlement workflow. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
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 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/streams/order_book/settlement_payout_test.go (1)
129-130: Redundant assignment.
dataProvideris already set todpAddr.Address()at line 78. This reassignment is unnecessary.Suggested fix
- // Set dataProvider to dpAddr for subsequent attestation and market creation - dataProvider = dpAddr.Address()🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/streams/order_book/settlement_payout_test.go` around lines 129 - 130, The assignment dataProvider = dpAddr.Address() is redundant because dataProvider is already initialized to dpAddr.Address() earlier; remove the duplicate assignment in settlement_payout_test.go (the second occurrence) to avoid unnecessary repetition and keep a single initialization of dataProvider tied to dpAddr.Address().
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@tests/streams/order_book/settlement_payout_test.go`:
- Around line 129-130: The assignment dataProvider = dpAddr.Address() is
redundant because dataProvider is already initialized to dpAddr.Address()
earlier; remove the duplicate assignment in settlement_payout_test.go (the
second occurrence) to avoid unnecessary repetition and keep a single
initialization of dataProvider tied to dpAddr.Address().
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c310ec95-4156-4b1b-8e8e-ea79646fb437
📒 Files selected for processing (2)
tests/streams/order_book/create_market_with_components_test.gotests/streams/order_book/settlement_payout_test.go
resolves: https://github.com/truflation/website/issues/3419
Summary by CodeRabbit