Files
Aurora-Core/tests
NixReaperandClaude Sonnet 5 64169c4aee
CI / lint (push) Canceled after 0s
CI / typecheck (push) Canceled after 0s
CI / unit-tests (push) Canceled after 0s
CI / integration-tests (push) Canceled after 0s
CI / container-build (push) Canceled after 0s
CI / dependency-audit (push) Canceled after 0s
Fix test factory Provider collision from ingestion-cascade tests
tests/integration/factories.py:make_provider did a raw INSERT
assuming no "tmdb" Provider row existed yet. That held as long as
every test used the db_session fixture's isolated, rolled-back
transaction -- but the new ingestion-cascade tests call
get_or_create_ingestion_job, which really commits via
session_scope()'s own connection, outside that per-test isolation.
Once that ran, every later test using the raw-insert factory hit
"duplicate key value violates unique constraint uq_providers_slug".

Fixed by using the app's own get_or_create_provider in the factory
instead of a bare insert, which is also just correct: provider slugs
are unique in production too, so the test helper should behave the
same way real ingestion code does rather than assume a pristine table.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-05 02:21:43 -05:00
..