pulp_2_tests.tests.rpm.api_v2.test_iso_sync_publish

Location: Pulp 2 TestsTestspulp_2_tests.tests.rpm.api_v2.test_iso_sync_publish

Tests that sync and publish ISO repositories.

class pulp_2_tests.tests.rpm.api_v2.test_iso_sync_publish.ServeHttpsFalseTestCase(methodName='runTest')

Bases: pulp_2_tests.tests.rpm.api_v2.utils.TemporaryUserMixin, unittest.case.TestCase

Publish w/an rsync distributor when serve_https is false.

More precisely, do the following:

  1. Create an ISO RPM repository. Ensure the repository has distributors of type iso_distributor and iso_rsync_distributor, and ensure the former distributor’s publish_https attribute is false.
  2. Populate the repository with some content.
  3. Publish the repository with both distributors. Assert that the ISO rsync distributor successfully places files on the target system.

This test targets Pulp #2657. According to this issue, the ISO rsync distributor will fail to publish files if the the ISO distributor has not published files via HTTPS.

setUp()

Set the pulp_manage_rsync boolean.

tearDown()

Reset the pulp_manage_rsync boolean.

test_all()

Publish w/an rsync distributor when serve_https is false.

class pulp_2_tests.tests.rpm.api_v2.test_iso_sync_publish.SyncInvalidFileTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Perform sync on an invalid file repository.

Assert that an exception is raised, and that error message has keywords related to the the reason of the failure.

This test targets the following issues:

test_all()

Perform sync on an invalid file repository.

class pulp_2_tests.tests.rpm.api_v2.test_iso_sync_publish.UploadIsoTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Upload an ISO file into an ISO repository.

test_all()

Upload an ISO file into an ISO repository.

Specifically, do the following:

  1. Create an ISO repository.
  2. Upload pulp_2_tests.constants.FILE_URL to the repository.
  3. Publish the repository.
  4. Download the published ISO, and assert it’s equal to the uploaded ISO.