mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
A round trip through the real handlers: post a recording, read it back through the list and the detail routes, and check what a client actually receives rather than a fixture rebuilt at each end. Post it twice and the second call says updated, not inserted, and the table does not grow. Feed the same strip to the export-archive importer afterwards and it says skipped; feed it to the importer first and the route says duplicate. Both directions leave one row. The migration test drops the index, manufactures the collisions the resolution step exists for, and runs the migration file through the same executor the deploy uses. It checks which row survived each tiebreak, that the salvaged event link followed the keeper, that rows differing only by user, source or sampling rate were left alone, and that the constraint rejects a new twin afterwards. Applying the migration to the empty testcontainer proves none of that. The Withings ECG tests now hand the transaction the same delegate the shared writer uses, so they still watch the real write instead of a stub standing in for it.