You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pixelfed/tests/Feature/Import
Ashley 114dfdced8 Copy then delete after commit in Instagram import to avoid data loss on rollback
Previously the source file was moved inside the DB transaction before the
writes committed. A failure after the move rolled back the DB but left the
file gone, so a retry skipped the photo and the job reported success with no
Media row. Now the source is copied inside the transaction and deleted only
after it commits, mirroring TransformImports, so a rolled-back attempt stays
retryable.

Verification (ddev, from repo root):
- pest tests/Feature/Import/ImportInstagramRetrySafetyTest.php --compact
    3 passed (12 assertions)
- pest --filter Import --compact
    20 passed (58 assertions)
- pint --test app/Jobs/ImportPipeline/ImportInstagram.php tests/Feature/Import/ImportInstagramRetrySafetyTest.php
    PASS (2 files)
1 week ago
..
ImportExistingFilesTest.php Return already-imported files from import existing endpoint 1 week ago
ImportInstagramRetrySafetyTest.php Copy then delete after commit in Instagram import to avoid data loss on rollback 1 week ago