backend CI swallows all test failures with || true #94

Closed
opened 2026-08-11 05:08:38 +00:00 by Mark · 2 comments
Owner

The backend-test job in .forgejo/workflows/ci.yml runs pytest with || true at the end, so any test failure is swallowed and CI always passes. As of d9bbe4d there are 73 pre-existing failures in the integration/security/performance suites (rate-limit tests expecting 429 get 403, parse-evidence creates 0 entities, 404-format tests, etc.) and nobody notices. Remove the || true (or make it a separate non-gating job) so broken tests actually fail CI.

The backend-test job in .forgejo/workflows/ci.yml runs pytest with `|| true` at the end, so any test failure is swallowed and CI always passes. As of d9bbe4d there are 73 pre-existing failures in the integration/security/performance suites (rate-limit tests expecting 429 get 403, parse-evidence creates 0 entities, 404-format tests, etc.) and nobody notices. Remove the `|| true` (or make it a separate non-gating job) so broken tests actually fail CI.
Author
Owner

Fixed in 9a07880. Root cause was two-fold: (1) the backend-test job ran the fast suite, fell back to the FULL suite, and appended || true so every failure was swallowed; (2) test files under tests/integration/, tests/security/, and tests/performance/ never declared pytestmark, so the -m "not integration and not performance and not security" filter did not exclude them — they ran inside the "fast" suite and failed. Added pytestmark to all 17 unmarked files, made the fast unit suite the gating step, and moved the full suite + security suite to continue-on-error (non-gating) so failures are visible without blocking until #95 is fixed. Fast suite now passes 1297/1297 locally with 487 correctly deselected.

Fixed in 9a07880. Root cause was two-fold: (1) the backend-test job ran the fast suite, fell back to the FULL suite, and appended `|| true` so every failure was swallowed; (2) test files under tests/integration/, tests/security/, and tests/performance/ never declared pytestmark, so the `-m "not integration and not performance and not security"` filter did not exclude them — they ran inside the "fast" suite and failed. Added pytestmark to all 17 unmarked files, made the fast unit suite the gating step, and moved the full suite + security suite to continue-on-error (non-gating) so failures are visible without blocking until #95 is fixed. Fast suite now passes 1297/1297 locally with 487 correctly deselected.
Author
Owner

fixup verification: issue already fixed on main in 9a078807 (verified via API). Gating step in .forgejo/workflows/ci.yml now runs pytest tests/ -v --tb=short --cov=app --cov-report=xml --cov-report=term-missing -m "not integration and not performance and not security" WITHOUT || true, so broken unit tests fail CI. Full suite moved to continue-on-error (non-gating) per the issue's suggested alternative. All 17 unmarked integration/security/performance files got pytestmark so the -m filter excludes them. Closing.

fixup verification: issue already fixed on main in 9a078807 (verified via API). Gating step in .forgejo/workflows/ci.yml now runs `pytest tests/ -v --tb=short --cov=app --cov-report=xml --cov-report=term-missing -m "not integration and not performance and not security"` WITHOUT `|| true`, so broken unit tests fail CI. Full suite moved to continue-on-error (non-gating) per the issue's suggested alternative. All 17 unmarked integration/security/performance files got pytestmark so the -m filter excludes them. Closing.
Mark closed this issue 2026-08-12 08:29:34 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/osint-hub#94
No description provided.