Skip to content

fix: tests#51

Open
Mouradif wants to merge 3 commits intofeat/add-eurm-fpmmsfrom
fix/timestamp-based-tests
Open

fix: tests#51
Mouradif wants to merge 3 commits intofeat/add-eurm-fpmmsfrom
fix/timestamp-based-tests

Conversation

@Mouradif
Copy link
Copy Markdown
Contributor

No description provided.

@Mouradif Mouradif marked this pull request as draft March 20, 2026 12:40
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR mainly stabilizes integration tests by introducing _dealTokens funding helpers and adjusting rebalance timing/setup across CDP and reserve scenarios. It also removes several assertions/tests, which currently introduces coverage regressions and one inconsistent test-helper behavior.

test/integration/V3IntegrationBase.t.sol

  • 🟡 IMPORTANT (L301-L311): _dealTokens uses different semantics by path: mint path checks balanceBefore + amount (additive), while deal path checks amount (absolute). The same helper call can therefore produce different balances depending on token implementation, making test setup non-deterministic across assets.
  • 🟡 IMPORTANT (L314-L341): _dealAUSD is used as an unconditional fallback for any token if mint/deal fail, without asserting token identity or post-condition. If fallback is reached for a non-AUSD token, setup can silently write unrelated storage and proceed with invalid assumptions.

test/integration/CDPMigrationVerification.t.sol

  • 🟡 IMPORTANT (L458-L480): test_cdpPools_reserveTrove_valid docstring says it verifies reserve trove interest rate, but the interest-rate assertion was removed. This drops a migration invariant check while still claiming coverage.

test/integration/RebalanceCDP.t.sol

  • 🟡 IMPORTANT (L194-L200): test_rebalance_revertsWhenWithinThreshold now continues when pool is above threshold. If all pools are above threshold on fork state, the test becomes vacuous (no revert assertions executed).
  • 🟢 SUGGESTION (L4): console import is unused; remove to keep test file clean.

test/integration/RebalanceReserve.t.sol

  • 🟡 IMPORTANT (L118-L124): same vacuous-test risk as CDP variant; continue can skip all pools and produce a false pass.

test/integration/StateVerification.t.sol

  • 🟡 IMPORTANT (L291 transition point): BreakerBox/MarketHoursBreaker tests were removed (registration, trading mode, and per-feed enablement) with no replacement, reducing safety coverage around breaker configuration.

test/integration/UpgradeabilityVerification.t.sol

  • 🟡 IMPORTANT (L200 transition point): Celo governance proxy-admin ownership tests (Emission/Locking/MentoGovernor/TimelockController) were removed with no replacement, reducing upgrade/governance safety coverage.

Final verdict: 🚫 Needs changes

Open in Web View Automation 

Sent by Cursor Automation: PR Review

@Mouradif Mouradif force-pushed the fix/timestamp-based-tests branch from 967d237 to 87c8934 Compare March 24, 2026 16:29
@Mouradif Mouradif marked this pull request as ready for review March 28, 2026 00:52
@Mouradif Mouradif changed the base branch from main to feat/add-eurm-fpmms March 30, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant