Skip to content

[SC-78] assetsup's paired old/new test files need a duplication audit #1349

Description

@yusuftomilola

Overview

contracts/assetsup/src/tests/ has both an original and a _new suffixed file for several areas — insurance.rs + insurance_new.rs, tokenization.rs + tokenization_new.rs, plus standalone dividends_new.rs, voting_new.rs, transfer_restrictions_new.rs, and detokenization_new.rs with no non-_new counterpart. This naming pattern strongly suggests a module was re-implemented in a later pass without the older test file being reconciled or removed, which risks either duplicate coverage (wasted CI time) or, worse, the old file silently testing stale/removed behavior.

Tasks

  • For each X.rs/X_new.rs pair, diff them: if X_new.rs supersedes X.rs, remove X.rs (or merge any test case it has that X_new.rs is missing) and drop the _new suffix for clarity.
  • For the standalone _new-suffixed files with no pair, just drop the suffix if there's no naming collision reason for it to still be there.

Acceptance Criteria

  • No test file in assetsup/src/tests/ carries a _new suffix implying an un-reconciled duplicate, and no coverage was silently testing removed behavior.

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