Expand description
Fake GEG Gastro ordering portal on loopback, for tests of clients of the portal. It serves synthetic data only.
Sim::start serves an account of two children, “Muster, Max” (11111)
and “Muster, Mia” (22222), with menus for the weeks 2026-W49 to
2026-W52, orders, 45 bookings and three invoices. Meals can be ordered and
cancelled, which changes the balance, with the rules of the portal: one
meal a day, before the deadlines, while the balance lasts. The login works like
that of the portal: a CSRF token from the login page and its cookie, a
Referer, then a session cookie. Sim::inject makes it fail in the
ways the portal can, and Sim::requests tells what a client sent.
let sim = geg_gastro_sim::Sim::start().await?;
assert!(sim.url().starts_with("http://127.0.0.1:"));Structs§
Enums§
- Injection
- A way to make the portal fail. Each applies once, to the first request it fits.
Constants§
- NOW
- The time of the portal unless
Sim::set_nowchanges it: Monday of 2026-W49, 7 o’clock. - PASSWORD
- The password of the account.
- USERNAME
- The user name of the account.