Repository navigation
test: add regression tests for #471 #472 #473 #477 - #733
Merged
chonilius merged 2 commits intoOct 18, 2026
Merged
Conversation
…rgeFi#477 All four issues identified missing test coverage for guards that were implemented by earlier PRs but never accompanied by a test. MergeFi#472 / maintenance-pool - test_initialize_rejects_treasury_equal_to_contract_address: passes the contract's own address as treasury; asserts InvalidTreasury. MergeFi#471 / milestones - test_initialize_rejects_treasury_equal_to_contract_address: same guard, same shape. MergeFi#477 / milestones - test_initialize_accepts_fee_bps_at_boundary_10000: passes fee_bps = 10_000 (the inclusive upper bound); asserts it is accepted and stored. Mirrors the equivalent test already present in escrow (test_initialize_accepts_fee_bps_at_boundary_10000). MergeFi#473 / escrow - test_existing_sponsor_can_top_up_when_at_max_sponsors_cap: fills the escrow to exactly MAX_SPONSORS distinct contributors, then has the original funder (an existing sponsor) call contribute again; asserts the call succeeds, the contributed amount increases, and the contributor_count does not grow past the cap.
|
@Alheriii is attempting to deploy a commit to the chonilius' projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Alheriii Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the four missing regression tests identified in #471, #472, #473, and #477 — all guards were already implemented by prior PRs but never accompanied by a test.
contracts/maintenance-pool/src/test.rs— #472 (closed #308)test_initialize_rejects_treasury_equal_to_contract_address— passes the contract's own address astreasury; assertsInvalidTreasuryis returned.contracts/milestones/src/test.rs— #471 (closed #307) and #477 (closed #340)test_initialize_rejects_treasury_equal_to_contract_address— same guard, same shape as the maintenance-pool test.test_initialize_accepts_fee_bps_at_boundary_10000— passesfee_bps = 10_000(inclusive upper bound); asserts it is accepted and stored. Mirrorstest_initialize_accepts_fee_bps_at_boundary_10000already present inescrow.contracts/escrow/src/test.rs— #473 (closed #347)test_existing_sponsor_can_top_up_when_at_max_sponsors_cap— fills the escrow to exactlyMAX_SPONSORSdistinct contributors, then has the original funder (an existing sponsor) callcontributeagain; asserts the call succeeds, thetotal_fundedincreases by the contributed amount, andcontributor_countdoes not grow past the cap.All three test files follow the patterns of the surrounding tests exactly (same setup helpers, same mock/auth approach).
Closes #471
Closes #472
Closes #473
Closes #477