Skip to content

Write integration tests for full stream lifecycle via API #334

@ogazboiz

Description

@ogazboiz

Join our community: https://t.me/+DOylgFv1jyJlNzM0

Description

No integration tests verify the event indexer, stream controller, SSE broadcast, and RPC fallback working end-to-end.

Test Cases Needed

  • Indexer processes stream_created → stream in GET /v1/streams/{id}
  • Indexer processes stream_topped_updepositedAmount updated
  • Indexer processes stream_pausedisPaused = true, claimable stops growing
  • Indexer processes stream_resumedisPaused = false, accrual resumes
  • Indexer processes stream_cancelledisActive = false
  • Stale DB (>30s) → GET /v1/streams/{id}/claimable falls back to RPC
  • SSE client receives broadcast for each event

Files

  • backend/src/__tests__/integration/streams.test.ts (create)

Acceptance Criteria

  • All tests pass with real Postgres
  • SSE verified with a test client
  • Runs in CI

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackendBackend related taskstestingTesting related tasks

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