Skip to content

Add credential-nft upgrade unit tests #540

Closed

Description

@DeFiVC

Severity: medium
Labels: tests, rust, Stellar Wave

What

Write unit tests for upgrade, wasm_hash, and upgrade_version on the credential-nft contract.

Why

These functions have zero test coverage on credential-nft. The learn-token upgrade is tested but credential-nft's upgrade path is not.

Scope

  • Test upgrade sets new wasm hash and increments version
  • Test upgrade emits upgraded event
  • Test wasm_hash returns None before first upgrade
  • Test wasm_hash returns correct hash after upgrade
  • Test upgrade_version returns 0 initially, increments after upgrade
  • Test admin-only auth on upgrade

Out of scope

Testing state preservation after upgrade (already covered in integration).

Acceptance criteria

  • All 6 test cases pass

Technical context

contracts/credential-nft/src/lib.rs contains upgrade functions.

Activity

  1. added
    testsTest additions or improvements
    rustRust language
    Stellar WaveIssues in the Stellar wave program
    mediumFunctionality impaired but workaround exists, edge case, partial feature
    and removed
    Stellar WaveIssues in the Stellar wave program
    on Oct 14, 2026
  2. young-wallace commented on Oct 20, 2026

    @young-wallace

    @young-wallace has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Can i work on this issue PR merge within 1hr

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @young-wallace to this issue.

  3. devsimze commented on Oct 20, 2026

    @devsimze
    Contributor

    @devsimze has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi I'd like to work on this issue

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @devsimze to this issue.

  4. somotochukwu-dev commented on Oct 20, 2026

    @somotochukwu-dev

    @somotochukwu-dev has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi
    Please assign this issue to me
    Thanks

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @somotochukwu-dev to this issue.

  5. CelestinaBeing commented on Oct 20, 2026

    @CelestinaBeing

    @CelestinaBeing has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hello Maintainer, I can fix this please assign.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @CelestinaBeing to this issue.

  6. drips-wave commented on Oct 20, 2026

    @drips-wave

    Congratulations, @devsimze! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @devsimze: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  7. devsimze commented on Oct 21, 2026

    @devsimze
    Contributor

    Fixed by #679.

  8. drips-wave commented on Oct 21, 2026

    @drips-wave

    This issue has been completed by @devsimze as part of the Stellar Wave Program's 10th Wave 🥳

    😎 @devsimze: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

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 programmediumFunctionality impaired but workaround exists, edge case, partial featurerustRust languagetestsTest additions or improvements

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions