Skip to main content

Module mock_suotar

Module mock_suotar 

Source
Expand description

Mock Suotar’s simulator: the registry world, its store, the answer logic, faults, scenarios and fixtures. Its routes are in controllers::mock_suotar.

The mock writes no database table, and its call log holds unscrubbed fake data that must never feed suotar_api_calls.

Modules§

commands
The control commands behind the mock’s /control/command route.
default_world
The world installed when nothing has been pushed, and the marker that says which database it belongs to.
faults
Addressed faults: what can go wrong that the world’s own data cannot express.
fixtures
The fixture identities the credit-registration (Suotar) system tests are built from.
ids
Default identifier derivations for the simulated world. Every control upsert may pass an id verbatim instead, and the seed does for anything a spec asserts on.
logic
Per-item world-state resolution: pure functions over the working set, with now passed in.
scenarios
Named scenarios: small compositions of the control primitives, exposed as one command.
store
The only Redis-aware part of the mock: key layout, generations, the per-request working set, the write-back pipeline and the call log.
wire
The mock’s half of the moocfi endpoints: its own request and response shapes, deliberately not shared with the client so the two can disagree the way a real Suotar and our client can.
world
The simulated Sisu and Suotar world: entities, the per-submission send and importer state, and the per-request working set the endpoints resolve over.