pulp_2_tests.tests.rpm.api_v2.test_mirrorlist

Location: Pulp 2 TestsTestspulp_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:

  1. Create a repository. Make its importer feed option reference a “bad” mirrorlist file.
  2. Sync the repository. Expect a failure.
test_all()

Execute the test case business logic.

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 pass relative_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:

  1. Create a repository. Make its importer feed option reference a “good” mirrorlist file.
  2. Sync and publish the repository.
  3. Download and verify a file from the published repository.
test_all()

Execute the test case business logic.

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 pass relative_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.

  1. Create a repository. Make its importer feed option reference a “mixed” mirrorlist file.
  2. Sync and publish the repository.
  3. Download and verify a file from the published repository.
test_all()

Execute the test case business logic.

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 pass relative_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. If None, 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.