Skip to content

Add end-to-end integration tests for deposit and withdraw flows #219

Description

@robertocarlous

Summary

Deposit and withdraw are the most financially sensitive flows but only have unit-level coverage. Full integration tests against a real Postgres + mocked Stellar RPC would catch regressions that unit tests miss.

Scope

  • Seed test database with a funded user and custodial wallet
  • POST /api/deposit: verify Transaction record, position update, event cursor advance
  • POST /api/withdraw: verify balance deduction, transaction record, DLQ on RPC failure
  • Assert correct HTTP status, response shape, and database state after each operation

Acceptance Criteria

  • Tests run against a Dockerised Postgres (can use existing docker-compose)
  • Stellar RPC calls are mocked via jest.mock
  • Both happy path and error path (RPC failure → DLQ) covered
  • Tests added to CI node-ci.yml workflow

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programenhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions