pulp_smash.tests.rpm.api_v2.test_remove_unit

Location: Pulp SmashAPI Documentationpulp_smash.tests.rpm.api_v2.test_remove_unit

Tests for the remove_missing repository option.

class pulp_smash.tests.rpm.api_v2.test_remove_unit.RemoveMissingTestCase(methodName='runTest')

Test the remove_missing repository option.

The test procedure is as follows:

  1. Create a repository, populate it with content, and publish it.
  2. Create several more repositories whose “feed” attribute references the repository created in the previous step. Sync each of these child repositories.
  3. Remove a content unit from the parent repository and re-publish it.
  4. Re-sync each of the child repositories.

The child repositories are designed to test the following issues:

classmethod setUpClass()

Initialize class-wide variables.

classmethod tearDownClass()

Delete all resources named by resources.

test_01_create_root_repo()

Create, sync and publish a repository.

The repositories created in later steps sync from this one.

test_02_create_immediate_child()

Create a child repository with the “immediate” download policy.

Sync the child repository, and verify it has the same contents as the root repository.

test_02_create_on_demand_child()

Create a child repository with the “on_demand” download policy.

Also, let the repository’s “remove_missing” option be true. Then, sync the child repository, and verify it has the same contents as the root repository.

test_03_update_root_repo()

Remove a content unit from the root repository and republish it.

test_04_sync_immediate_child()

Sync the “immediate” repository.

Verify it has the same contents as the root repository.

test_04_sync_on_demand_child()

Sync the “on demand” repository.

Verify it has the same contents as the root repository.