Skip to content

[Testing] MultisigGovernance ProposalIdMismatch and expire-on-cancelled branches are uncovered #1150

Description

@grantfox-oss

Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0

Why this matters

multisig_governance/src/lib.rs:485-487 returns GovernanceError::ProposalIdMismatch (4018) when emergency_cancel_proposal is called with a wrong id, and expire_proposal (519-537) returns ProposalNotActive for a cancelled proposal. multisig_governance/src/test.rs exercises emergency_cancel only with the correct id and never expires a cancelled proposal, so both branches have no test.

Acceptance criteria

  • Test emergency_cancel_proposal with a non-matching proposal_id returns ProposalIdMismatch
  • Test expire_proposal on a proposal that was already cancelled returns ProposalNotActive
  • Test emergency_cancel_proposal is idempotent when called twice (second call returns Ok on an already-cancelled proposal)

Files to touch

  • contracts/multisig_governance/src/test.rs

Out of scope

  • Changing emergency-cancel or expiry semantics

Metadata

Metadata

Assignees

No one assigned

    Labels

    contractsIssues related to smart contractsrustPull requests that update rust codetestingAdding or fixing tests

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions