Skip to content

maintenance-pool::get_deposit/reclaim_deposit on a nonexistent deposit index has no test #313

Description

@abayomicornelius

Overview

Both get_deposit (contracts/maintenance-pool/src/lib.rs:417-422) and reclaim_deposit (:245-250) return Error::DepositNotFound for a deposit_index that doesn't exist under an existing pool_id. grep -c "DepositNotFound" contracts/maintenance-pool/src/test.rs returns 0. (Contrast the existing test_get_pool_and_withdraw_reject_nonexistent_pool, which covers a nonexistent pool, not a nonexistent deposit index within an existing pool — the distinction issue #46, already closed and correctly fixed at the code level, was about.)

Requirements

Add tests for get_deposit and reclaim_deposit called with a valid pool_id but an out-of-range deposit_index.

Acceptance Criteria

  • Both tests added, asserting Error::DepositNotFound
  • cargo test --workspace passes

Additional Notes

Verified via grep -c "DepositNotFound" contracts/maintenance-pool/src/test.rs (0 matches).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programtestingTesting/QA infrastructure

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions