Skip to content

Write integration tests for stream lifecycle via API #279

@ogazboiz

Description

@ogazboiz

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

Description

There are no integration tests covering the full stream lifecycle through the REST API. The event indexer, stream controller, and SSE broadcasting all need to be tested together.

Test Cases Needed

  • Indexer processes stream_created event → stream appears in GET /v1/streams/{id}
  • Indexer processes stream_topped_updepositedAmount updated in DB
  • Indexer processes stream_pausedisPaused = true, claimable stops growing
  • Indexer processes stream_resumedisPaused = false, accrual resumes
  • Indexer processes stream_cancelled → stream isActive = false
  • GET /v1/streams/{id}/events?eventType=PAUSED returns only PAUSED events
  • SSE client receives broadcast after each event

Files

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

Acceptance Criteria

  • All tests pass with real Postgres
  • SSE verified with a test SSE 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