test(8118): the family-line integration test writes as a real user
CI & Build / TypeScript typecheck (push) Successful in 38s
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 14s
CI & Build / Python tests (push) Successful in 2m12s
CI & Build / integration (push) Successful in 2m15s
CI & Build / Build & push image (push) Successful in 22s
CI & Build / TypeScript typecheck (push) Successful in 38s
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 14s
CI & Build / Python tests (push) Successful in 2m12s
CI & Build / integration (push) Successful in 2m15s
CI & Build / Build & push image (push) Successful in 22s
app_logs.user_id references users(id) in migration 0010 (the model does not declare the key), so an invented user id made every entry write fail, silently by design, and the readout counted zero. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -297,8 +297,16 @@ async def test_family_line_counts_entries_and_the_ones_that_carried_the_line(_di
|
|||||||
from grimoire.models.app_log import AppLog
|
from grimoire.models.app_log import AppLog
|
||||||
from grimoire.services.family_adoption import record_entry
|
from grimoire.services.family_adoption import record_entry
|
||||||
from grimoire.services.retrieval_telemetry import retrieval_summary
|
from grimoire.services.retrieval_telemetry import retrieval_summary
|
||||||
|
from tests.helpers import ensure_user
|
||||||
|
|
||||||
UID, PID = 990007, 990107
|
# A real user: app_logs.user_id references users(id), so an invented id
|
||||||
|
# makes every write fail (silently, as telemetry must).
|
||||||
|
async with async_session() as s:
|
||||||
|
UID = (await ensure_user(s, "family_line_itest")).id
|
||||||
|
await s.commit()
|
||||||
|
await s.execute(delete(AppLog).where(AppLog.user_id == UID))
|
||||||
|
await s.commit()
|
||||||
|
PID = 990107
|
||||||
await record_entry(UID, PID, {"unassessed": 3, "owed": 1, "needs_recheck": 0})
|
await record_entry(UID, PID, {"unassessed": 3, "owed": 1, "needs_recheck": 0})
|
||||||
await record_entry(UID, PID, None)
|
await record_entry(UID, PID, None)
|
||||||
await record_entry(UID, PID, {"unassessed": 2, "owed": 1, "needs_recheck": 0})
|
await record_entry(UID, PID, {"unassessed": 2, "owed": 1, "needs_recheck": 0})
|
||||||
|
|||||||
Reference in New Issue
Block a user