2.6 KiB
loomio — parity & coverage map
P2 — Parity port
The recipe-maintainer corpus has no recipe-info/loomio/ directory, so there is no parity
corpus to port. Coverage is delivered by the generic lifecycle tiers (install/upgrade/backup/restore)
plus the recipe-specific tests below.
Lifecycle (generic tiers)
Loomio ships no test_<op>.py overlays, so the generic install/upgrade/backup/restore tiers run.
The stack bundles postgres (pgautoupgrade) and redis in-compose, so no external deps are needed.
Backup/restore is asserted by the generic tiers (the db service carries backupbot labels and a
pg_backup.sh pre/post hook).
P3 — Recipe-specific functional tests (≥2 non-vacuous)
| cc-ci file | what's verified | why non-vacuous |
|---|---|---|
custom/test_api_health.py |
GET /api/v1/boot/version → 200 JSON with a release version. |
Proves the Rails stack booted through DB setup/migrations and the JSON API is live, not just a served page. |
custom/test_group_roundtrip.py |
User + open/public group created via the Rails console; group read back anonymously over GET /api/v1/groups/<key>; name + handle round-trip. |
Exercises the group write path, the public-visibility ability rule, FriendlyId key lookup and serialization. A broken DB/API layer fails. |
custom/test_discussion_roundtrip.py |
User + group + public discussion created via DiscussionService; discussion read back anonymously over GET /api/v1/discussions/<key>; title + unique body marker round-trip. |
The recipe's defining object; exercises privacy validation, DiscussionService event publication and the anonymous visibility query. |
Why the console (STYLE §1)
Loomio has no unauthenticated write API: account creation is email/login-token based and the REST
API is session-authenticated (Devise + CSRF). The tests therefore create state through the app's own
console (bundle exec rails runner) using the same models/services the controllers use — STYLE §1
option 2 — and read it back over public HTTP, a different path. Identifiers are ccci--prefixed with
.example.com emails and are run-scoped, so leftover state is attributable and re-runs are safe.
Deferred
- Session-auth write flow through
POST /api/v1/registrations+POST /api/v1/sessions(needs CSRF token + cookie jar); the console path already covers the write services, so this would only add controller-level coverage. - The separate
channelsservice (loomio_channel_server, served atchannels.<domain>) is not exercised because the harness gates the single app domain.