Skip to content

orge-stream — add test verifying stream_paused and stream_resumed events are emitted with correct stream_id #309

Description

@Austinaminu2

Summary

pause_stream() emits:

env.events().publish((Symbol::new(&env, "stream_paused"),), (stream_id,));

resume_stream() emits:

env.events().publish((Symbol::new(&env, "stream_resumed"),), (stream_id,));

There are no tests verifying these events are emitted at all or that the stream_id in the payload is correct. The existing pause/resume tests only check StreamStatus fields.

Tasks

  • After pause_stream(), use env.events().all() to assert a stream_paused event exists
  • Assert the event data contains the correct stream_id
  • After resume_stream(), assert a stream_resumed event exists with the correct stream_id
  • Add a test verifying no pause event is emitted on a failed pause_stream() call (e.g. already paused)
  • Follow the event verification pattern from test_submit_price_emits_event in forge-oracle

Labels: testing, forge-stream

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions