Skip to content

feat(tests): add full multisig flow test suite with scenarios for pro…#254

Open
samieazubike wants to merge 1 commit into
codebestia:mainfrom
samieazubike:issue-127
Open

feat(tests): add full multisig flow test suite with scenarios for pro…#254
samieazubike wants to merge 1 commit into
codebestia:mainfrom
samieazubike:issue-127

Conversation

@samieazubike

Copy link
Copy Markdown
Contributor

…posal lifecycle

Description

Adds a dedicated multisig-flow test suite for the group_treasury contract (closes #127). The new mod multisig_flow in contracts/contracts/group_treasury/src/test.rs covers all 10 scenarios from the issue, reusing the existing voting_setup / seed_proposal / mock_token helpers. No production contract code is changed.

4 active, passing tests (against currently-implemented APIs):

  • multisig_approvals_reach_threshold_passes — approvals reaching threshold flip to Passed (scenario 3)
  • multisig_double_vote_panics — a member voting twice panics (scenario 4)
  • multisig_rejection_blocks_proposal — rejections reaching the blocking minority flip to Rejected (scenario 5)
  • multisig_approve_after_expiry_panics — approving after expiry panics (scenario 9)

6 documented, ignored stubs carrying an explicit #[ignore = "blocked on …"] reason and the exact ledger-sequence (set_sequence_number / ttl_ledgers) assertions to enable once their dependencies land:

  • multisig_propose_by_member, multisig_propose_by_non_member_panics — blocked on Implement propose_withdraw on Group Treasury contract #122 (propose_withdraw)
  • multisig_execute_on_approved, multisig_execute_on_pending_panics — blocked on a group_treasury execute entrypoint (no issue yet)
  • multisig_finalize_expired — blocked on an expiry finalizer (no issue yet)
  • multisig_get_pending_proposals_filtering — blocked on get_pending_proposals (no issue yet)

The stub bodies call no not-yet-generated client methods, so the crate compiles cleanly.

⚠️ Note on acceptance criteria: #127's "all 10 tests pass" cannot be fully met on main today — propose_withdraw (#122), execute, finalize, and get_pending_proposals don't exist yet. The 6 stubs are ready to activate as soon as those functions merge. When #122 moves expiry from timestamp() to ledger sequence, multisig_approve_after_expiry_panics should switch set_timestampset_sequence_number (noted inline).

Verification

  • cargo test -p group_treasury → 35 passed, 6 ignored, 0 failed
  • cargo fmt -p group_treasury -- --check → clean
  • cargo clippy -p group_treasury --tests → no warnings

Type of change

  • Bug fix
  • New feature
  • Documentation update
  • Other (test coverage)

Checklist

  • I have read the contributing guidelines
  • I have tested my changes locally
  • My code follows the project's coding standards

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@samieazubike 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

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.

Write unit tests for the full multisig flow

1 participant