Skip to content

[SC-70] contrib's insurance.rs and lease.rs — its only genuinely compiled, contrib-specific logic — have zero dedicated tests #1341

Description

@yusuftomilola

Overview

contrib/src/insurance.rs (199 lines) and lease.rs (137 lines) are both genuinely declared in lib.rs's module tree (mod insurance; mod lease;) and are the only business logic in the crate beyond the base asset registry that actually compiles — but contracts/contrib/src/tests/mod.rs only declares asset_registry_tests plus the four modules flagged as uncompiled in [SC-61]. There is no test file for insurance or lease at all, despite them being real, live, deployed functionality.

Tasks

  • Add tests/insurance.rs covering policy creation, claim filing (file_claim/whatever the entrypoint is named), and claim status transitions (ClaimStatus, imported by events.rs).
  • Add tests/lease.rs covering lease creation, the lease lifecycle referenced by lease.rs's .expect("Lease not found") call sites (see [SC-59]), and expiry handling.
  • Declare both new modules in tests/mod.rs.

Acceptance Criteria

  • contrib's only real business logic beyond the base registry — insurance and lease — has dedicated test coverage.

Notes for Contributors

Requires Rust + Soroban. Workspace: contracts/ (soroban-sdk 23, members: assetsup, contrib, multisig-wallet, multisig-transfer, asset-maintenance). Run cargo test --all, cargo fmt --all -- --check, and cargo clippy --all-targets --all-features -- -D warnings before opening a PR — CI enforces all three. Comment below to be assigned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    contracttestingTests, QA, and quality assurance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions