pulp_2_tests.tests.rpm.cli.test_copy_units

Location: Pulp 2 TestsTestspulp_2_tests.tests.rpm.cli.test_copy_units

Tests that copy units from one repository to another.

class pulp_2_tests.tests.rpm.cli.test_copy_units.CopyLangpacksTestCase(methodName='runTest')

Bases: pulp_2_tests.tests.rpm.cli.test_copy_units.UtilsMixin, unittest.case.TestCase

Copy langpacks from one repository to another.

This test case verifies that it is possible to use the pulp-admin rpm repo copy langpacks command to copy langpacks from one repository to another. See Pulp Smash #255.

test_all()

Copy langpacks from one repository to another.

Assert that:

  • pulp-admin does not produce any errors.
  • A non-zero number of langpacks are present in the target repository.
class pulp_2_tests.tests.rpm.cli.test_copy_units.CopyRecursiveTestCase(methodName='runTest')

Bases: pulp_2_tests.tests.rpm.cli.test_copy_units.UtilsMixin, unittest.case.TestCase

Recursively copy a “chimpanzee” unit from one repository to another.

This test case verifies that it is possible to use the pulp-admin rpm repo copy command to recursively copy units from one repository to another. See Pulp Smash #107.

pytestmark = [Mark(name='recursive_conservative', args=(), kwargs={})]
test_all()

Recursively copy a “chimpanzee” unit from one repository to another.

“chimpanzee” depends on “walrus,” and there are multiple versions of “walrus” in the source repository. Verify that one “walrus” unit has been copied to the target repository, and that the newer one has been copied.

class pulp_2_tests.tests.rpm.cli.test_copy_units.CopyTestCase(methodName='runTest')

Bases: pulp_2_tests.tests.rpm.cli.test_copy_units.UtilsMixin, unittest.case.TestCase

Copy a “chimpanzee” unit from one repository to another.

This test case verifies that it is possible to use the pulp-admin rpm repo copy command to copy a single unit from one repository to another.

test_all()

Copy a “chimpanzee” unit from one repository to another.

Verify that only the “chimpanzee” unit is in the target repository.

class pulp_2_tests.tests.rpm.cli.test_copy_units.UpdateRpmTestCase(methodName='runTest')

Bases: pulp_2_tests.tests.rpm.cli.test_copy_units.UtilsMixin, unittest.case.TestCase

Update an RPM in a repository and on a host.

Do the following:

  1. Create two repositories. Populate the first, and leave the second empty.
  2. Pick an RPM with at least two versions.
  3. Copy the older version of the RPM from the first repository to the second, and publish the second repository.
  4. Pick a host system capable of installing RPMs. (By default, this is the system hosting Pulp.) Make it add the second repository as a source of packages, and make it install the RPM.
  5. Copy the newer version of the RPM from the first repository to the second, and publish the second repository.
  6. Make the host install the newer RPM with yum update rpm_name, or a similar command.

This test case targets Pulp Smash #311.

test_all()

Update an RPM in a repository and on a host.

class pulp_2_tests.tests.rpm.cli.test_copy_units.UtilsMixin

Bases: object

A mixin providing useful tools to unittest subclasses.

Any class inheriting from this mixin must also inherit from unittest.TestCase or a compatible clone.

create_repo(cfg)

Create a repository and schedule it for deletion.

Parameters:cfg – The Pulp system on which to create a repository.
Returns:The repository’s ID.
pulp_2_tests.tests.rpm.cli.test_copy_units.setUpModule()

Possibly skip tests. Create and sync an RPM repository.

Skip tests in this module if the RPM plugin is not installed on the target Pulp server. Then create an RPM repository with a feed and sync it. Test cases may copy data from this repository but should not change it.

pulp_2_tests.tests.rpm.cli.test_copy_units.tearDownModule()

Delete the repository created by setUpModule.