pulp_2_tests.tests.rpm.api_v2.test_mirrorlist¶
Location: Pulp 2 Tests → Tests → pulp_2_tests.tests.rpm.api_v2.test_mirrorlist
Tests that exercise Pulp’s support for mirrorlist feeds.
The tests in this module target:
- Pulp #175: “As a user, I can specify mirrorlists for rpm repository feeds.”
- Pulp #2224: “Cannot sync from mirrorlists.”
The test cases in this module reference “good,” “mixed” and “bad” mirrorlist files. A “good” file contains only valid references, a “mixed” file contains both valid and invalid references, and a “bad” file contains only invalid references.
-
class
pulp_2_tests.tests.rpm.api_v2.test_mirrorlist.
BadMirrorlistTestCase
(methodName='runTest')¶ Bases:
pulp_2_tests.tests.rpm.api_v2.test_mirrorlist.UtilsMixin
,unittest.case.TestCase
Create a repository that references a “bad” mirrorlist file.
Do the following:
- Create a repository. Make its importer
feed
option reference a “bad” mirrorlist file. - Sync the repository. Expect a failure.
-
test_all
()¶ Execute the test case business logic.
- Create a repository. Make its importer
-
class
pulp_2_tests.tests.rpm.api_v2.test_mirrorlist.
BadRelativeUrlTestCase
(methodName='runTest')¶ Bases:
pulp_2_tests.tests.rpm.api_v2.test_mirrorlist.UtilsMixin
,unittest.case.TestCase
Like
BadMirrorlistTestCase
, but passrelative_url
too.-
test_all
()¶ Execute the test case business logic.
-
-
class
pulp_2_tests.tests.rpm.api_v2.test_mirrorlist.
GoodMirrorlistTestCase
(methodName='runTest')¶ Bases:
pulp_2_tests.tests.rpm.api_v2.test_mirrorlist.UtilsMixin
,unittest.case.TestCase
Create a repository that references a “good” mirrorlist file.
Do the following:
- Create a repository. Make its importer
feed
option reference a “good” mirrorlist file. - Sync and publish the repository.
- Download and verify a file from the published repository.
-
test_all
()¶ Execute the test case business logic.
- Create a repository. Make its importer
-
class
pulp_2_tests.tests.rpm.api_v2.test_mirrorlist.
GoodRelativeUrlTestCase
(methodName='runTest')¶ Bases:
pulp_2_tests.tests.rpm.api_v2.test_mirrorlist.UtilsMixin
,unittest.case.TestCase
Like
GoodMirrorlistTestCase
, but passrelative_url
too.-
test_all
()¶ Execute the test case business logic.
-
-
class
pulp_2_tests.tests.rpm.api_v2.test_mirrorlist.
MixedMirrorlistTestCase
(methodName='runTest')¶ Bases:
pulp_2_tests.tests.rpm.api_v2.test_mirrorlist.UtilsMixin
,unittest.case.TestCase
Create a repository that references a “mixed” mirrorlist file.
- Create a repository. Make its importer
feed
option reference a “mixed” mirrorlist file. - Sync and publish the repository.
- Download and verify a file from the published repository.
-
test_all
()¶ Execute the test case business logic.
- Create a repository. Make its importer
-
class
pulp_2_tests.tests.rpm.api_v2.test_mirrorlist.
MixedRelativeUrlTestCase
(methodName='runTest')¶ Bases:
pulp_2_tests.tests.rpm.api_v2.test_mirrorlist.UtilsMixin
,unittest.case.TestCase
Like
MixedMirrorlistTestCase
, but passrelative_url
too.-
test_all
()¶ Execute the test case business logic.
-
-
class
pulp_2_tests.tests.rpm.api_v2.test_mirrorlist.
UtilsMixin
¶ Bases:
object
A mixin providing methods to the test cases in this module.
Any class inheriting from this mixin must also inherit from
unittest.TestCase
or a compatible clone.-
check_issue_2277
(cfg)¶ Skip the current test method if Pulp issue #2277 affects us.
-
check_issue_2321
(cfg)¶ Skip the current test method if Pulp issue #2321 affects us.
-
check_issue_2326
(cfg)¶ Skip the current test method if Pulp issue #2326 affects us.
-
check_issue_2363
(cfg)¶ Skip the current test method if Pulp issue #2363 affects us.
-
create_repo
(cfg, feed, relative_url=None)¶ Create an RPM repository with a yum importer and distributor.
In addition, schedule the repository for deletion with
addCleanup
.Parameters: - cfg – The Pulp deployment on which to create a repository.
- feed – A value for the yum importer’s
feed
option. - relative_url – A value for the yum distributor’s
relative_url
option. IfNone
, this option is not passed to Pulp.
Returns: A detailed dict of information about the repository.
-
-
pulp_2_tests.tests.rpm.api_v2.test_mirrorlist.
setUpModule
()¶ Maybe skip this module of tests.
-
pulp_2_tests.tests.rpm.api_v2.test_mirrorlist.
tearDownModule
()¶ Delete orphan content units.