test(infra): fail-loud DB/ffmpeg lane + client/as_user/make_user fixtures (E1 S2, TEST-4)
The DB-backed lane and the two ffmpeg tests skipped SILENTLY when the DB was unreachable or ffmpeg was absent, so `siftlode check` could print green while ~60 tests never ran. Make the compose lane authoritative: - SIFTLODE_TEST_REQUIRE_DB=1 in docker-compose.test.yml; conftest.pytest_configure turns a would-be skip (no Postgres, or no ffmpeg) into a hard UsageError. - install ffmpeg in Dockerfile.test so the thumbnail/poster tests actually run. - `-rs` in pytest.ini so skip reasons are always visible. Add the shared TestClient fixtures the risk-core suites build on: `make_user` (create + commit a login-ready User), `client` (real auth/session stack, no current_user override — for login/wallet/epoch), and `as_user` (a client pre-authenticated as a given user, for tests that aren't exercising login).
This commit is contained in:
+4
-2
@@ -1,6 +1,8 @@
|
||||
[pytest]
|
||||
# Run from backend/ (the image's /app). `pythonpath = .` puts the app package on sys.path so tests
|
||||
# import it as `app.*`, matching runtime. The suite is pure-logic only (no DB/network) — see tests/.
|
||||
# import it as `app.*`, matching runtime. Most of the suite is pure-logic; the DB-backed lane opts in
|
||||
# via the `db` fixture and runs in the compose test image. `-rs` reports skip REASONS so a silently
|
||||
# skipped lane is visible (the compose lane sets SIFTLODE_TEST_REQUIRE_DB=1 to make skips a hard error).
|
||||
testpaths = tests
|
||||
pythonpath = .
|
||||
addopts = -q
|
||||
addopts = -q -rs
|
||||
|
||||
Reference in New Issue
Block a user