Skip to content

test: add test for upgrade with new_version == current_version rejecting - #291

Merged
nonsobethel0-dev merged 2 commits into
Parashield-Protocol:mainfrom
Adedayo-Data:task-2-governance-dao-upgrade-test
Jul 30, 2026
Merged

test: add test for upgrade with new_version == current_version rejecting#291
nonsobethel0-dev merged 2 commits into
Parashield-Protocol:mainfrom
Adedayo-Data:task-2-governance-dao-upgrade-test

Conversation

@Adedayo-Data

Copy link
Copy Markdown
Contributor

Description

This PR introduces test coverage for the upgrade function constraint in the governance-dao contract. Specifically, it verifies that any attempt to upgrade the contract WASM where the new_version is equal to (or lower than) the current_version is rejected with a VersionNotNewer error.

Changes

  • Added test_upgrade_rejects_same_version in contracts/governance-dao/src/test.rs.
  • Fixed a pre-existing missing argument in create_proposal inside test_proposal_expires_after_voting_period to restore crate compilation.

closes #210

@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@Adedayo-Data 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! 🚀

Learn more about application limits

@nonsobethel0-dev
nonsobethel0-dev merged commit cadf8b3 into Parashield-Protocol:main Jul 30, 2026
1 check failed
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.

governance-dao: no test for upgrade with new_version == current_version (should reject)

2 participants