fix(tests): resolve routes unit test failures in CI

- test_client_portal_dashboard_requires_access: expect 302 redirect to
  client portal login instead of 403. The client portal 403 handler
  redirects authenticated non-portal users to login by design.
- Run routes unit group with -n 0 in CI to avoid SQLite 'database is
  locked' errors from audit logging under pytest-xdist parallel workers;
  fixes client_portal and admin client-portal test failures.
This commit is contained in:
Dries Peeters
2026-01-25 09:41:39 +01:00
parent 239b393ffb
commit dffcf04b24
2 changed files with 6 additions and 2 deletions
+2
View File
@@ -99,6 +99,8 @@ jobs:
run: |
if [ "${{ matrix.test-group }}" == "api" ]; then
pytest -m "api and integration" -v -n auto --cov=app --cov-report=xml --cov-report=html --cov-report=term-missing
elif [ "${{ matrix.test-group }}" == "routes" ]; then
pytest -m "unit and routes" -v -n 0 --cov=app --cov-report=xml --cov-report=html --cov-report=term-missing
else
pytest -m "unit and ${{ matrix.test-group }}" -v -n auto --cov=app --cov-report=xml --cov-report=html --cov-report=term-missing
fi