pulp/pulp-smash

As a user, I can clean up both orphaned content units and orphaned artifacts

daviddavis opened this issue · 1 comments

Test Case 1

  1. Do a sync
  2. Create a few orphan content units
  3. Run a cleanup by calling DELETE /api/v3/orphans/

Result: Orphan content units should be cleaned up but the other content units created by sync should not.

Test Case 2

  1. Create an orphan artifact
  2. Run a cleanup by calling DELETE /api/v3/orphans/

Result: The artifact and the file on the filesystem should be cleaned up.

Test Case 3

  1. Create an orphan content unit with an artifact
  2. Run a cleanup by calling DELETE /api/v3/orphans/

Result: The content unit and the artifact should be cleaned up. Also, the artifact's file on the filesystem should be cleaned up too.

https://pulp.plan.io/issues/3442

An orphaned content unit is a content unit that is not in any repository version.
An orphaned artifact is an artifact that is not in any content units.