Skip to content

Issues #1034 , #1035, #1036 , and #1037 handle and test: add missing pool, auction, oracle ACL, and collateral-event coverage - #1082

Merged
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
Agaki00:frioh
Sep 1, 2026
Merged

Issues #1034 , #1035, #1036 , and #1037 handle and test: add missing pool, auction, oracle ACL, and collateral-event coverage#1082
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
Agaki00:frioh

Conversation

@Agaki00

@Agaki00 Agaki00 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Details

Closes #1034 - Lending pool-management tests (propchain-lending)

  • Add test_create_pool_unauthorized: non-admin create_pool returns Unauthorized
  • Add test_deposit_increases_total_deposits: deposit accounting is tracked
  • Add test_borrow_rejected_when_exceeds_deposits: pool-limit rejection path
  • Add test_deposit_and_borrow_accounting: sequential deposit/borrow round-trip
  • Add test_deposit_pool_not_found: unknown pool returns PoolNotFound
  • Move ink_e2e dev-dep behind e2e-tests feature to fix pre-existing trie-db/nightly incompatibility that blocked cargo test

Closes #1035 - Fractional Dutch-auction end-state tests (fractional)

  • Add test_dutch_auction_settlement_transfers_shares: share balances settle correctly after a winning bid (seller loses, buyer gains)
  • Add test_dutch_auction_price_decay_at_three_quarters: linear decay verified at 75% of duration
  • Add test_dutch_auction_exact_payment_succeeds: boundary — exact payment accepted
  • Add test_dutch_auction_second_bidder_receives_already_bid_error: one-shot AuctionAlreadyBid guard on an already-won auction
  • Add test_dutch_auction_payment_one_below_minimum_rejected: payment 1 unit below total is rejected with InsufficientPayment
    Closes Oracle access-control and TTL messages are untested: role gates and set_cache_ttl are uncovered #1036 - Oracle access-control and TTL tests (oracle)
  • Add test_set_cache_ttl_by_admin_succeeds: admin/OracleAdmin can set TTL
  • Add test_set_cache_ttl_unauthorized_fails: non-admin rejected Unauthorized
  • Add test_grant_oracle_admin_role_and_use_ttl: granted OracleAdmin can call admin-gated messages
  • Add test_grant_role_requires_admin: only Admin-role holders can grant roles
  • Add test_add_oracle_source_unauthorized_rejection: role gate on a second admin-gated message (add_oracle_source)
  • Move ink_e2e dev-dep behind e2e-tests feature (same trie-db fix as lending)

Closes #1037 - Property-management collateral-event tests (property-management)

  • Wire collateral_events module into lib.rs with pub mod collateral_events (it was never compiled — the 2 existing tests were silently skipped)
  • Add test_event_preserves_assigned_at_timestamp
  • Add test_event_fields_match_inputs_exactly
  • Add test_multiple_events_for_same_property_are_independent
  • Add test_activation_then_deactivation_events_are_independent
  • Add test_zero_assigned_at_is_accepted

Test results:
cargo test -p propchain-lending 56 passed, 0 failed
cargo test -p fractional 55 passed, 0 failed
cargo test -p oracle 67 passed, 0 failed
cargo test -p property-management 22 passed, 0 failed

Related Issues

…erage (MettaChain#1034-MettaChain#1037)

Issue MettaChain#1034 - Lending pool-management tests (propchain-lending)
- Add test_create_pool_unauthorized: non-admin create_pool returns Unauthorized
- Add test_deposit_increases_total_deposits: deposit accounting is tracked
- Add test_borrow_rejected_when_exceeds_deposits: pool-limit rejection path
- Add test_deposit_and_borrow_accounting: sequential deposit/borrow round-trip
- Add test_deposit_pool_not_found: unknown pool returns PoolNotFound
- Move ink_e2e dev-dep behind e2e-tests feature to fix pre-existing
  trie-db/nightly incompatibility that blocked cargo test

Issue MettaChain#1035 - Fractional Dutch-auction end-state tests (fractional)
- Add test_dutch_auction_settlement_transfers_shares: share balances settle
  correctly after a winning bid (seller loses, buyer gains)
- Add test_dutch_auction_price_decay_at_three_quarters: linear decay verified
  at 75% of duration
- Add test_dutch_auction_exact_payment_succeeds: boundary — exact payment
  accepted
- Add test_dutch_auction_second_bidder_receives_already_bid_error: one-shot
  AuctionAlreadyBid guard on an already-won auction
- Add test_dutch_auction_payment_one_below_minimum_rejected: payment 1 unit
  below total is rejected with InsufficientPayment

Issue MettaChain#1036 - Oracle access-control and TTL tests (oracle)
- Add test_set_cache_ttl_by_admin_succeeds: admin/OracleAdmin can set TTL
- Add test_set_cache_ttl_unauthorized_fails: non-admin rejected Unauthorized
- Add test_grant_oracle_admin_role_and_use_ttl: granted OracleAdmin can call
  admin-gated messages
- Add test_grant_role_requires_admin: only Admin-role holders can grant roles
- Add test_add_oracle_source_unauthorized_rejection: role gate on a second
  admin-gated message (add_oracle_source)
- Move ink_e2e dev-dep behind e2e-tests feature (same trie-db fix as lending)

Issue MettaChain#1037 - Property-management collateral-event tests (property-management)
- Wire collateral_events module into lib.rs with pub mod collateral_events
  (it was never compiled — the 2 existing tests were silently skipped)
- Add test_event_preserves_assigned_at_timestamp
- Add test_event_fields_match_inputs_exactly
- Add test_multiple_events_for_same_property_are_independent
- Add test_activation_then_deactivation_events_are_independent
- Add test_zero_assigned_at_is_accepted

Test results:
  cargo test -p propchain-lending   56 passed, 0 failed
  cargo test -p fractional          55 passed, 0 failed
  cargo test -p oracle              67 passed, 0 failed
  cargo test -p property-management 22 passed, 0 failed
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

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

@Agaki00 Agaki00 changed the title Issues #1034 , #1035, 1036 , and #1037 handle and test: add missing pool, auction, oracle ACL, and collateral-event coverage Issues #1034 , #1035, #1036 , and #1037 handle and test: add missing pool, auction, oracle ACL, and collateral-event coverage Aug 31, 2026
@nanaf6203-bit
nanaf6203-bit merged commit fef5786 into MettaChain:main Sep 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment