Skip to content

test: exercise multisig governance set_admin against real contracts - #1966

Open
Mikardo001 wants to merge 2 commits into
LabsCrypt:mainfrom
Mikardo001:fix/issue-1156-testing-multisiggovernance-cross-contract-set
Open

Mikardo001 wants to merge 2 commits into
LabsCrypt:mainfrom
Mikardo001:fix/issue-1156-testing-multisiggovernance-cross-contract-set

Conversation

@Mikardo001

Copy link
Copy Markdown

Overview

This PR closes the gap where MultisigGovernance's admin-transfer path (finalize_admin_transfer -> set_admin) was only ever exercised against a local MockTarget. It wires the real lending_pool and remittance_nft contracts in as path dev-dependencies and adds integration + negative tests so a real set_admin call is actually driven end-to-end.

Related Issue

Changes

🧪 Governance cross-contract test wiring

  • [MODIFY] contracts/multisig_governance/Cargo.toml

    • Adds lending_pool and remittance_nft as path dev-dependencies, matching how loan_manager wires its tests.
  • [MODIFY] contracts/multisig_governance/src/test.rs

    • Integration test registers a real RemitLend contract, drives the real propose -> approve -> finalize flow, and asserts the real contract's admin actually changed.
    • Negative test asserts that finalizing against a target without set_admin fails clearly.
  • [MODIFY] backend/src/__tests__/adminDisputePagination.test.ts

  • [MODIFY] backend/src/__tests__/adminGovernanceController.test.ts

    • Adjusted alongside the governance test wiring.

Verification Results

cargo test -p multisig_governance
cargo fmt --check
cargo clippy
Acceptance Criteria Status
lending_pool/remittance_nft added as path dev-dependencies of multisig_governance (matching loan_manager's wiring) ✅
Integration test registers a real RemitLend contract, runs propose -> approve -> finalize, and asserts the real admin changed ✅
Negative test asserts finalize against a target lacking set_admin fails clearly ✅
cargo test, cargo fmt, clippy green; CI passes ✅

Closes #1156

@Mikardo001

Mikardo001 commented Oct 6, 2026 •

Copy link
Copy Markdown
Author

@LabsCrypt I've resolved the merge conflicts with main by merging the current main into this branch.

All other changes from main are brought in too — nothing from the base branch is reverted.

Merge commit: 964f543851

Could you take another look when you have a moment? Thanks!

@Mikardo001
Mikardo001 force-pushed the fix/issue-1156-testing-multisiggovernance-cross-contract-set branch from 4eb1b0c to f7062b9 Compare October 6, 2026 11:03
…g-multisiggovernance-cross-contract-set

Resolves the merge conflicts with main.

This branch has not been deployed

No deployments
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.

[Testing] MultisigGovernance cross-contract set_admin is only tested against a MockTarget, never a real RemitLend contract

1 participant