pulp_smash.tests.rpm.api_v2.test_content_applicability

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

Tests for Pulp’s content applicability feature.

class pulp_smash.tests.rpm.api_v2.test_content_applicability.BasicTestCase(methodName='runTest')

Perform simple applicability generation tasks.

classmethod setUpClass()

Create and sync a repository.

The regular test methods that run after this can create consumers that bind to this repository.

classmethod tearDownClass()

Delete the repository created by setUpClass().

test_negative()

Verify content isn’t made available when appropriate.

Do the same as test_positive(), except that both packages’ versions are equal to what’s offered by the repository.

test_positive()

Verify content is made available when appropriate.

Specifically, do the following:

  1. Create a consumer.
  2. Bind the consumer to the repository created in setUpClass().
  3. Create a consumer profile where:
    • two packages are installed,
    • both packages’ versions are lower than what’s offered by the repository,
    • one of the corresponding packages in the repository has an applicable erratum, and
    • the other corresponding package in the repository doesn’t have an applicable erratum.
  4. Regenerate applicability for the consumer.
  5. Fetch applicability for the consumer. Verify that both packages are listed as eligible for an upgrade.
pulp_smash.tests.rpm.api_v2.test_content_applicability.CONTENT_APPLICABILITY_REPORT_SCHEMA = {'items': {'type': 'object', 'properties': {'consumers': {'items': {'type': 'string'}, 'type': 'array'}, 'applicability': {'type': 'object', 'properties': {'rpm': {'items': {'type': 'string'}, 'type': 'array'}}}}}, 'type': 'array', 'description': 'Derived from: http://docs.pulpproject.org/dev-guide/integration/rest-api/consumer/applicability.html#query-content-applicability', '$schema': 'http://json-schema.org/schema#', 'title': 'Content Applicability Report'}

A schema for a content applicability report for a consumer.

pulp_smash.tests.rpm.api_v2.test_content_applicability.RPM_WITHOUT_ERRATUM_METADATA = mappingproxy({'epoch': '0', 'version': '0.1', 'vendor': None, 'release': 1, 'name': 'camel', 'arch': 'noarch'})

Metadata for an RPM without an associated erratum.

pulp_smash.tests.rpm.api_v2.test_content_applicability.RPM_WITH_ERRATUM_METADATA = mappingproxy({'epoch': '0', 'version': '4.1', 'vendor': None, 'release': 1, 'name': 'bear', 'arch': 'noarch'})

Metadata for an RPM with an associated erratum.