Skip to content

Funding-round transfer block has zero test coverage #319

Description

@abayomicornelius

Area

Investment Vault / Testing

Complexity

Easy

File(s)

investment_vault/src/lib.rs:1413-1440 (start_funding_round/end_funding_round/is_funding_round_active), :2213-2222 (FungibleToken::transfer override)

Problem

Grepping test.rs for start_funding_round/end_funding_round/is_funding_round_active/FundingRoundActive returns zero hits. The transfer override that's supposed to block HBS transfers during an active funding round ("to prevent vault-accounting manipulation") has never been exercised by a test, so a regression here would go unnoticed.

Scope

In:

  • Test that transfer panics with FundingRoundActive while a round is open, and succeeds once closed.

Out:

  • Changing the funding-round semantics.

Acceptance Criteria

  • Test starts a round, attempts a share transfer, asserts panic
  • Test ends the round, asserts the same transfer now succeeds
  • is_funding_round_active() getter is asserted at both states

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 programcontractSmart contract logic and designgood first issueGood for newcomerstestingTests and test infrastructure

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions