pulp_smash.tests.rpm.api_v2.test_repomd

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

Verify the repomd.xml file generated by a YUM distributor.

class pulp_smash.tests.rpm.api_v2.test_repomd.FastForwardIntegrityTestCase(methodName='runTest')

Ensure fast-forward publishes use files referenced by repomd.xml.

When Pulp performs an incremental fast-forward publish, it should copy the original repository’s repodata/[…]-primary.xml file to the new repository, and then modify it as needed.

According to Pulp #1088, Pulp does something different: it searches for all files named repodata/[0-9a-zA-Z]*-primary.xml.*, sorts them by mtime, copies the newest one to the new repository and modifies it. This behaviour typically works, because Pulp only creates one […]-primary.xml file in a given repository. However, this behaviour is fragile, and it’s especially likely to fail when third-party tools are used to supplement Pulp’s functionality. What Pulp should do is to consult the old repository’s repomd.xml file to find the […]-primary.xml file.

Do the following:

  1. Create a repository with a yum distributor, sync in some content, and publish it. Verify that […]-primary.xml contains a certain phrase.
  2. Create a second […]-primary.xml file in the published repository, and replace the known phrase with a new phrase. Trigger a full publish, and verify that the known phrase is present, not the new phrase.
  3. Create a second […]-primary.xml file in the published repository, and replace the known phrase with a new phrase. Trigger an incremental publish, and verify that the known phrase is present, not the new phrase.
test_all()

Ensure fast-forward publishes use files referenced by repomd.xml.

class pulp_smash.tests.rpm.api_v2.test_repomd.RepoMDTestCase(methodName='runTest')

Tests to ensure repomd.xml can be created and is valid.

classmethod setUpClass()

Generate, fetch and parse a repomd.xml file.

Do the following:

  1. Create an RPM repository with a YUM distributor and publish it.
  2. Fetch the repomd.xml file from the distributor, and parse it.
test_data()

Assert the tree’s “data” elements have correct “type” attributes.

test_tag()

Assert the XML tree’s root element has the correct tag.