pulp_smash.tests.pulp2.rpm.api_v2.test_remove_unit

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

Tests for the remove_missing repository option.

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

Re-sync a child repository with the remove_missing enabled.

After removing an arbitrary number of units from the parent repository.

Do the following:

  1. Create 1st repository with, feed, sync and publish it.
  2. Create 2nd repository with feed pointed to 1st repository, and remove_missing enabled, sync.
  3. Remove an arbitrary number of units from 1st repository, re-publish it.
  4. Re-sync the 2nd repository. Assert that removed_count is equal to number of removed units.

Pulp issue #2616 caused after sync with remove_missing option the next publish is no-op.

test_all()

Re-sync a child repository with the remove_missing enabled.

class pulp_smash.tests.pulp2.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.