Test Pulp’s handling of orphaned content units.
Establish that API calls related to orphans function correctly.
At a high level, this test case does the following:
- Create an RPM repository and populate it with content. Delete the repository, thus leaving behind orphans.
- Make several orphan-related API calls, and assert that each call has the desired effect.
check_one_orphan_deleted(orphans_pre, orphans_post, orphan)¶
Ensure that a specific orphan is well and truly deleted.
Create, sync and delete an RPM repository. Doing this creates orphans that the test methods can make use of.
Assert that an expected number of orphans is present.
If the expected number of orphans is present, set a class variable indicating such. The following test methods can conditionally run or skip based on this variable. If this method fails, it may indicate that other repositories exist and have references to the same content units.
Get an orphan by its href.
Get orphans by content type. Specify a non-existent content type.
Delete an orphan by its href.
Delete an orphan by its ID and type.
This test exercises Pulp #1923.
Delete orphans by their content type.
Delete all orphans.
Assert no orphans exist.