pulp_smash.tests.rpm.api_v2.test_retain_old_count

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

Test the functionality in RPM repos when retain_old_count is specified.

Following steps are executed in order to test correct functionality of repository created with valid feed and retain_old_count option set.

  1. Create repository foo with valid feed, run sync, add distributor to it and publish over http and https.
  2. Create second repository bar, with feed pointing to first repository, set retain_old_count=0 and run sync.
  3. Assert that repositories do not contain same set of units.
  4. Assert that number or RPMs in repo bar is less then in foo repo.
class pulp_smash.tests.rpm.api_v2.test_retain_old_count.RetainOldCountTestCase(methodName='runTest')

Test functionality of –retain-old-count option specified.

classmethod setUpClass()

Create two repositories, first is feed of second one.

Provides server config and set of iterable to delete. Following steps are executed:

  1. Create repository foo with feed, sync and publish it.
  2. Create repository bar with foo as a feed with retain_old_count=0.
  3. Run sync of repo foo.
  4. Get information on both repositories.
test_retain_old_count_works()

Test that content_unit_counts in repositories differ.

Most of the RPMs in the first repository are unique. However, there are two different versions of the “walrus” RPM. When we copy its contents to the second repository with retain_old_count=0, zero old versions of the “walrus” RPM will be copied.

test_status_code()

Verify the HTTP status code of each server response.