Skip to content

test: integration coverage for insurance, governance, monitoring and sanctions contracts - #1052

Merged
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
authenticeasy-sys:feature/integration-tests-insurance-governance-monitoring-sanctions
Aug 25, 2026
Merged

test: integration coverage for insurance, governance, monitoring and sanctions contracts#1052
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
authenticeasy-sys:feature/integration-tests-insurance-governance-monitoring-sanctions

Conversation

@authenticeasy-sys

Copy link
Copy Markdown
Contributor

Summary

Adds integration test coverage in tests/ for four contract crates that previously had none: insurance (#1001), governance (#1002), monitoring (#1003) and sanctions (#1004). New modules are declared in tests/lib.rs, matching the existing integration_bridge_oracle.rs pattern (#[ink::test] + direct contract construction).

What's covered

Issue Crate Coverage
#1001 insurance policy creation + bad-input rejections, claim authorization & payout lifecycle, oracle-event reporting w/ authorized-reporter enforcement
#1002 governance signer setup → proposal → votes to threshold → timelock elapse → execute; non-signer/double-vote/majority-against rejections
#1003 monitoring subscriber round-trip (duplicate subscribe = idempotent no-op per source), reporter management, health/alert-config, pause/resume gating, admin transfer
#1004 sanctions entity/property administration gates, screening FAIL→clear→PASS lifecycle, jurisdiction-aware screening & removal

Supporting changes

  • tests/Cargo.toml: add propchain-sanctions; drop unused ink-as-dependency from propchain-monitoring so it can be constructed in-process.
  • Visibility-only pub on the insurance/governance/monitoring/sanctions contract modules (ink! v5 requires a public module path for cross-crate imports).

No business logic changed.

Testing

  • cargo test -p propchain-tests36 passed (16 new)

Closes #1001
Closes #1002
Closes #1003
Closes #1004

…and sanctions

Adds integration test modules to the propchain-tests suite (declared in
tests/lib.rs) covering four contract crates that had zero integration
coverage:

- Insurance (MettaChain#1001): policy creation with bad-input rejections,
  claim authorization + payout lifecycle, oracle-event reporting with
  authorized-reporter enforcement and alert firing.
- Governance (MettaChain#1002): signer setup -> create_proposal -> votes to
  threshold -> timelock elapse -> execute_proposal happy path, plus
  non-signer proposal/vote rejection, double-vote rejection and a
  majority-against proposal that must not execute.
- Monitoring (MettaChain#1003): alert subscriber round-trip (subscribe is an
  idempotent no-op on duplicates, per source), reporter management and
  authorization, health-status override + alert-config round-trip,
  pause/resume gating, transfer_admin revoking the old admin.
- Sanctions (MettaChain#1004): admin-gated entity/property administration,
  screening lifecycle that FAILs while a property is linked to a
  sanctioned entity and PASSes after clearing, jurisdiction-aware
  entity screening and removal semantics.

Also adds propchain-sanctions as a test-crate dependency, drops the
unused ink-as-dependency feature from the propchain-monitoring dep so the
contract can be constructed in-process, and makes the
insurance/governance/monitoring/sanctions contract modules `pub` so they
can be imported cross-crate (ink! v5 requires a public module path).
No business logic is changed.

All 36 tests in `cargo test -p propchain-tests` pass, including 16 new ones.

Closes MettaChain#1001
Closes MettaChain#1002
Closes MettaChain#1003
Closes MettaChain#1004
@drips-wave

drips-wave Bot commented Aug 25, 2026

Copy link
Copy Markdown

@authenticeasy-sys 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

@nanaf6203-bit
nanaf6203-bit merged commit d8ea251 into MettaChain:main Aug 25, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants