Skip to content

[SC-41] Expand asset-maintenance test coverage (729 lines, only 4 tests) #1205

Description

@yusuftomilola

Overview

contracts/asset-maintenance/ is 729 lines across just lib.rs and test.rs with 4 #[test] functions. It records maintenance history on-chain, which is audit evidence — incorrect or forgeable records undermine the point.

Tasks

  • Enumerate every entrypoint and add happy-path plus failure-path tests for each.
  • Test maintenance record creation, update, and completion, including invalid status transitions.
  • Test authorization: only permitted roles may record or amend maintenance; add negative tests without mock_all_auths.
  • Test that historical records cannot be silently altered or deleted — this is the core audit property.
  • Test date and scheduling boundaries, including records scheduled in the past.
  • Assert every error variant is reachable.
  • Consider splitting lib.rs if it carries several distinct concerns.

Acceptance Criteria

  • At least 25 tests covering every entrypoint.
  • A test proves historical records are immutable through the API.
  • Authorization boundaries are covered by negative tests.

Notes for Contributors

Requires Rust + Soroban. Workspace: contracts/ (soroban-sdk 22, 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

Labels

Stellar WaveIssues in the Stellar wave programcontracttestingTests, QA, and quality assurance

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions