pulp_2_tests.tests.rpm.cli.test_retain_old_count¶
Location: Pulp 2 Tests → Tests → pulp_2_tests.tests.rpm.cli.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.cli.test_retain_old_count.
RetainOldCountTestCase
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Test the
retain_old_count
feature.This test targets Pulp #2785.
-
create_sync_repo
(retain_old_count)¶ Create and sync a repository. Return 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.
-
classmethod
tearDownClass
()¶ Destroy the repository created by
setUpClass()
.
-
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.
-