test: cover 7 previously-untested backend API route modules #61
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "test/backend-pytest-coverage-gaps"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
metrics,click_log,role_permissions, andvideos(straightforward, standardget_db-only endpoints).pending-identifications,pending-linkages, andreported-photos— these read/write the separate auth database (DATABASE_URL_AUTH) via raw SQL against tables owned byviewer-frontend/prisma/schema-auth.prisma. Extendedtests/conftest.pywith a second test-DB engine/session (test_auth_db_session) that mirrors that schema via raw DDL, and wiredget_auth_dbinto thetest_clientdependency overrides.test_api_faces.py/test_api_jobs.py/test_api_photos.pyare unrelated drift, not caused by this change.Known gap / follow-up
pending_photos.py(file upload approve/reject with hash-based duplicate detection + filesystem moves) is intentionally left uncovered — it needs a dedicated filesystem-mocking strategy that felt out of scope for this pass.pytest tests/at all (onlydocker-ci,secret-scan,skip-ci-check,e2eexist in.gitea/workflows/ci.yml), so this suite is only exercised vianpm run test:backendlocally today. Wiring atest-backendCI job is a good next follow-up.Test plan
npm run test:backend(against a local Postgres) — 183 passede2e/,viewer-frontend/, or CI config in this PR