[Arch] db.py (1,350 lines, 72 functions) has no dedicated test file #65
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Severity: Medium | Category: Testing
db.pyis at 78% coverage, but only as a side effect oftest_api.py/test_ingest.py/test_pipeline.py— notests/test_db.pyexists to assert its own contracts directly (e.g. upsert collision behavior, update allowlist behavior).Recommendation: Add
tests/test_db.pycoveringupsert_shipmentcreate/update/collision paths,update_shipment's allowlist behavior,add_event/add_scrape_log, and the transaction helper once added.Full detail:
docs/architecture-review.md§ C + § H.8Fixed on branch
architecture-rework, commit40bb96b: addedtests/test_db.pywith 12 direct tests coveringupsert_shipment(create/update/backfill/state-forward-only),update_shipment's column allowlist,add_event,add_scrape_log, anddb.transaction()(commit-on-success and rollback-on-failure). Full suite: 252 passed.