pulp_2_tests.tests.rpm.api_v2.test_modular_errata¶
Location: Pulp 2 Tests → Tests → pulp_2_tests.tests.rpm.api_v2.test_modular_errata
Tests that perform actions over modular Errata repositories.
-
class
pulp_2_tests.tests.rpm.api_v2.test_modular_errata.
ManageModularErrataTestCase
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Manage Modular Errata content testcase.
This test targets the following issues:
-
classmethod
setUpClass
()¶ Create class wide variables.
-
test_collection_field
()¶ Test the collection field in the update info.
This test provides the following:
- Check whether all the modules in the published repo contains a collection field.
- Check whether the collection field has proper name. The collection name computation is as below.
The collection name is created using the information from fixtures that is stored in a set
{<errata-id>:<module-name>}
.First, the set information is used in computing a set
collections_from_fixtures
that maps the repo_id to the collection-name.The collection-name set is computed using the logic
<repo-id>_<index>_<module-name>
. The module name isdefault
and the index is 0 for ursine RPMs.The set is created using set-comprehension and x-path. After creating the set, it appears as in the example below.
collections_from_fixtures = { 'RHEA..1' : 'repo_id_1_duck', 'RHEA..2' : 'repo_id_2_duck', 'RHEA..3' : 'repo_id_0_default' }
This set is compared against the collection-name from the published repo’s
updateinfo
.
-
test_copy_errata
()¶ Test whether Errata modules are copied.
This Test does the following:
- It creates, syncs, and publishes a modules rpm repository.
- Creates another repo with no feed.
- Recursively copies an errata from one repo to another.
- Checks whether the errata information in the new repo is correct.
-
test_sync_publish_update_info
()¶ Test sync,publish of Modular RPM repo and checks the update info.
This testcase reads the updateinfo of the repository that is published and compares that against the
updateinfo.xml
present in the feed url.Steps involved:
- Create a repository with feed url containing modules.
- The repository should have a distributor to publish it.
- Once the repository is created, it is synced and published.
- Get the
updateinfo
from the repodata of the published repo. - Compare this against the
update_info.xml
in the fixtures repo.
-
test_upload_errata
()¶ Upload errata and check whether it got published in the repo.
This test does the following:
- Create and sync a repo with
RPM_WITH_MODULES_FEED_URL
. - Upload a custom modular erratum to the repo. The custom
module erratum is obtained from
_get_erratum()
. Make sure that the erratum uploaded has a corresponding module in the feed url. - Publish the repo after uploading the custom erratum.
- Verify whether the uploaded erratum is present in the published repo and also contains the modules in it.
- Create and sync a repo with
-
classmethod