Bug #35965
closeddelete orphans task does not remove pulp3 remotes from capsules when removing repositories
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2160264
Description of problem:
When repositories are to be removed from a capsule, the remotes used to sync the repositories are left behind.
Version-Release number of selected component (if applicable):
Pulp 3 Katello
How reproducible:
Always
Steps to Reproduce:
1. Sync some repositories to a capsule
2. Dissociate the environments that are being synced to the capsule
3. Run a delete_orphans task against the capsule
4. Check pulp API to ensure the repositories are gone (endpoint /pulp/api/v3/repositories/)
5. Check pulp API remotes and you'll see they are still around (endpoint pulp/api/v3/remotes/rpm/rpm/)
Actual results:
Remotes are left behind
Expected results:
Remotes would be delete together with the repository it's in charge of syncing.
Additional info: