pulp_2_tests.tests.rpm.api_v2.test_retain_old_count¶
Location: Pulp 2 Tests → Tests → pulp_2_tests.tests.rpm.api_v2.test_retain_old_count
Test the retain_old_count feature.
When more than one version of an RPM is present in a repository and Pulp syncs from that repository, it must choose how many versions of that RPM to sync. By default, it syncs all versions of that RPM. The retain_old_count option lets one sync a limited number of outdated RPMs.
-
class
pulp_2_tests.tests.rpm.api_v2.test_retain_old_count.
RetainOldCountTestCase
(*args, **kwargs)¶ Bases:
pulp_smash.pulp2.utils.BaseAPITestCase
Test the
retain_old_count
feature.-
create_sync_repo
(retain_old_count)¶ Create and sync a repository. Return detailed information about it.
Implement the logic described by the
test_retain_*
methods.
-
classmethod
setUpClass
()¶ Create, populate and publish a repository.
Ensure at least two versions of an RPM are present in the repository.
-
test_retain_one
()¶ Give
retain_old_count
a value of one.Create a repository whose feed references the repository created in
setUpClass()
, and whoseretain_old_count
option is one. Sync the repository, and assert that one old version of any duplicate RPMs were copied over.
-
test_retain_zero
()¶ Give
retain_old_count
a value of zero.Create a repository whose feed references the repository created by
setUpClass()
, and whoseretain_old_count
option is zero. Sync the repository, and assert that zero old versions of any duplicate RPMs were copied over.
-