Skip to content

test(soroban): add unit tests for looping + rewards and cargo test CI gate - #433

Open
northersubair wants to merge 4 commits into
Quantarq:mainfrom
northersubair:fix/soroban-test-suite-ci-gate
Open

test(soroban): add unit tests for looping + rewards and cargo test CI gate#433
northersubair wants to merge 4 commits into
Quantarq:mainfrom
northersubair:fix/soroban-test-suite-ci-gate

Conversation

@northersubair

Copy link
Copy Markdown
Contributor

Description

Add comprehensive unit tests for the looping and rewards Soroban contracts, and wire cargo test into the Soroban CI workflow so regressions are caught on every PR.

Related Issue

Closes #420

Change Type

  • test — adding or updating tests
  • ci — CI/CD changes

Testing Done

  • 8 tests for looping: open_position ID monotonicity, collateral/leverage validation, boundary values
  • 6 tests for rewards: accrue/claim accounting, negative accrual rejection, zero-balance claim
  • Total: 28 tests passing across all contracts (vault=6, liquidation=4, common=4, looping=8, rewards=6)
  • cargo test job added to soroban.yml CI workflow (needs: [fmt, clippy])

Screenshots (if UI changes)

None

Environment Variables

None

Checklist

  • make lint passes (pylint on changed .py files)
  • make test passes (pytest in quantara/web_app/tests/)
  • CI is green on this PR
  • Documentation updated (if applicable)
  • PR is linked to a related issue (Closes #420)

… gate

- 8 tests for looping contract (open_position ID monotonicity, validation)
- 6 tests for rewards contract (accrue/claim accounting, edge cases)
- Added cargo test job to soroban.yml CI workflow
- Total: 28 tests passing across all contracts

Closes Quantarq#420

@YaronZaki YaronZaki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@YaronZaki YaronZaki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@northersubair resolve conflicts please

…e-ci-gate

# Conflicts:
#	quantara/soroban/contracts/Cargo.lock
#	quantara/soroban/contracts/rewards/Cargo.toml
#	quantara/soroban/contracts/rewards/src/lib.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Soroban Contract Test Suite And Cargo Test CI Gate

3 participants