Skip to main content

Module test_support

Module test_support 

Source
Expand description

Test-only helpers for action implementors.

Provides a ReporterHarness that owns the channels and an InMemorySink needed to construct a Reporter in unit and integration tests, so downstream crates can exercise their actions without dealing with channel plumbing.

Structs§

FixedClock
A Clock frozen at a caller-chosen instant, for asserting that event times come from the injected clock rather than the wall clock.
ReporterHarness
Owns the channels and sink needed to build a Reporter for tests.

Functions§

begun_sink
An in-memory sink with test_header already written, ready to record facts.
ceremony_started
A CeremonyStarted fact for tests, over a fixed template digest.
fact_event
Wrap a fact into an ExecEvent::Fact stamped with fixed_test_time, for frontend tests that feed synthetic events into a driver.
fixed_test_time
A fixed instant for tests that need a deterministic event time. Arbitrary but stable, so recorded at values and snapshots stay reproducible.
test_header
A header for tests: a fixed run id, not a dry run.
write_transcript
Write transcript.jsonl in dir: test_header, then each fact at its default level and fixed_test_time. Returns the fingerprint.