Skip to content

[#140] Write integration tests for balance caching behavior with Redis #171

Description

@BigNathan1

Backlog reference: #140 · backend

Summary

Write integration tests for balance caching behavior with Redis

Context

Endpoints that read and write Stellar account state — balances, trustlines, payments, and the transaction-history audit trail. Handling Horizon's async, eventually-consistent behavior correctly (retries, sequence numbers, mapped error codes) matters more here than almost anywhere else in the backend.

Foundation work to reach a working single-community MVP: infrastructure, schema, core CRUD APIs, the Stellar contract layer, the base frontend, wallet auth, tests, CI, and a hardened security baseline. Every later phase assumes this phase is solid.

Acceptance Criteria

  • Write integration tests for balance caching behavior with Redis — implemented as described above.
  • Input is validated (Zod, matching the project convention) and errors follow the existing { data, meta?, error? } response envelope.
  • The change has unit and/or integration test coverage under backend/src/**/__tests__/.
  • Public API surface changes are reflected in the OpenAPI spec (docs/openapi.yaml).

Definition of Done

  • Implemented on a branch and opened as a PR referencing this issue (Closes #140 won't auto-link since this is a repo-internal reference — mention the issue number GitHub assigned instead).
  • CI is green (lint, typecheck, tests, build).
  • Reviewed against CONTRIBUTING.md conventions (Conventional Commits, code style).
  • CHANGELOG.md updated under [Unreleased] if the change is user- or API-visible.
  • Merged to main.

Generated from the CoopLumen backlog (issue.md). See CONTRIBUTING.md for the contribution workflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions