pulp_smash.tests.pulp3.file.api_v3.test_orphans

Location: Pulp SmashAPI Documentationpulp_smash.tests.pulp3.file.api_v3.test_orphans

Tests that perform actions over orphan files.

class pulp_smash.tests.pulp3.file.api_v3.test_orphans.DeleteOrphansTestCase(methodName='runTest')

Test whether orphans files can be clean up.

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

This test targets the following issues:

classmethod setUpClass()

Create class-wide variables.

test_clean_orphan_artifact()

Test whether orphan artifacts units can be clean up.

test_clean_orphan_content_unit()

Test whether orphan content units can be clean up.

Do the following:

  1. Create, and sync a repo.
  2. Remove a content unit from the repo. This will create a second repository version, and create an orphan content unit.
  3. Assert that content unit that was removed from the repo and its artifact are present on disk.
  4. Delete orphans.
  5. Assert that the orphan content unit was cleaned up, and its artifact is not present on disk.