pulp_smash.tests.rpm.api_v2.test_no_op_publish

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

Test Pulp’s handling of no-op publishes.

As of version 2.9, Pulp has the ability to perform no-op publishes, instead of the more typical full publish. A no-op publish is one in which no files are changed, including metadata files. No-op publishes occur when all of the components — including the repository, distributor and override config — are unchanged.

Tests for this feature include the following:

For more information, see:

class pulp_smash.tests.rpm.api_v2.test_no_op_publish.BaseTestCase(methodName='runTest')

Provide common behaviour for the test cases in this module.

classmethod setUpClass()

Create a repository with a distributor, and populate it.

In addition, create several variables for use by the test methods.

test_first_publish()

Assert the first publish is a full publish.

class pulp_smash.tests.rpm.api_v2.test_no_op_publish.ChangeRepoTestCase(methodName='runTest')

Publish a repository, change it, and publish it again.

classmethod setUpClass()

Publish a repository, change it, and publish it again.

test_second_publish_repomd()

Assert the two publishes produce identical repomd.xml files.

test_second_publish_tasks()

Assert the second publish’s last task reports a no-op publish.

class pulp_smash.tests.rpm.api_v2.test_no_op_publish.NoOpPublishMixin

Provide tests for the no-op publish test cases in this module.

test_second_publish_repomd()

Assert the two publishes produce identical repomd.xml files.

test_second_publish_tasks()

Assert the second publish’s last task reports a no-op publish.

class pulp_smash.tests.rpm.api_v2.test_no_op_publish.PubTwiceTestCase(methodName='runTest')

Publish a repository twice.

classmethod setUpClass()

Publish a repository twice.

class pulp_smash.tests.rpm.api_v2.test_no_op_publish.PubTwiceWithOverrideTestCase(methodName='runTest')

Publish a repository twice, with an override config both times.

classmethod setUpClass()

Publish a repository twice, with an override config both times.

pulp_smash.tests.rpm.api_v2.test_no_op_publish.get_repomd_xml_path(distributor_rel_url)

Construct the path to a repository’s repomd.xml file.

Parameters:distributor_rel_url – A distributor’s relative_url option.
Returns:An string path to a repomd.xml file.
pulp_smash.tests.rpm.api_v2.test_no_op_publish.setUpModule()

Possibly skip the tests in this module. Create and sync an RPM repo.

Skip this module of tests if Pulp is older than version 2.9. (See Pulp #1724.) 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_smash.tests.rpm.api_v2.test_no_op_publish.tearDownModule()

Delete the repository created by setUpModule().