The Forgejo Actions CI `test` job has never passed — all 24 runs show
failure. Two root causes: the Forgejo `podman` runner's service
container networking doesn't reliably expose the PostgreSQL hostname,
and the CI pipeline doesn't provision RabbitMQ, causing
`fedora_messaging.api.publish()` to raise `ConnectionException`.
Since the codebase uses zero PostgreSQL-specific features, the test
database backend can safely be switched to SQLite in-memory. This
eliminates all external service dependencies for tests.
Changes to test infrastructure:
- Override `DATABASES` in `tsting.py` to use SQLite in-memory
- Add Celery memory broker settings to prevent Redis connections
- Add `CRISPY_ALLOWED_TEMPLATE_PACKS` for `bootstrap5` compatibility
- Set dummy `ADMIN_USERNAME`/`ADMIN_PASSWORD` for FAS `AccountSystem`
- Create `conftest.py` with autouse fixtures to mock `publish()`,
`AccountSystem.people_query()`, and provide a stub `STATIC_ROOT`
Changes to CI pipeline:
- Remove `postgres:15` and `redis:7` service containers
- Remove `gcc`/`libpq-dev` system dependency step
Bug fixes surfaced by the new test environment:
- Replace stale `import ckeditor.fields` in migration 0007 with
`models.TextField` (old `django-ckeditor` removed in Phase 5)
- Pass `link_rel=None` to `nh3.clean()` to fix `ValueError` when `'rel'`
is in `allowed_attributes` (nh3 >= 0.2.18 API change)
Closes#281.
Assisted-by: Claude Opus 4.6 (1M context)
Signed-off-by: Justin Wheeler <jwheel@fedoraproject.org>