pulp_smash.tests.rpm.api_v2.test_upload_publish

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

Tests that upload to and publish RPM repositories.

For information on repository upload and publish operations, see Uploading Content and Publication.

class pulp_smash.tests.rpm.api_v2.test_upload_publish.UploadDrpmTestCase(methodName='runTest')

Test whether one can upload a DRPM into a repository.

This test case targets Pulp Smash #336

classmethod setUpClass()

Import a DRPM into a repository and search it for content units.

Specifically, this method does the following:

  1. Create a yum repository.
  2. Upload a DRPM into the repository.
  3. Search for all content units in the repository.
test_drpm_file_name_is_correct()

Test if DRPM extracted correct metadata for creating filename.

test_drpm_uploaded_successfully()

Test if DRPM has been uploaded successfully.

test_status_code_units()

Verify the HTTP status code for repo units response.

class pulp_smash.tests.rpm.api_v2.test_upload_publish.UploadRpmTestCase(methodName='runTest')

Test whether one can upload, associate and publish RPMs.

The test procedure is as follows:

  1. Create a pair of repositories.
  2. Upload an RPM to the first repository, and publish it.
  3. Copy the RPM to the second repository, and publish it.
classmethod setUpClass()

Create a pair of RPM repositories.

classmethod tearDownClass()

Clean up resources created during the test.

test_01_upload_publish()

Upload an RPM to the first repository, and publish it.

Execute verify_repo_search() and verify_repo_download().

test_02_copy_publish()

Copy and RPM from the first repo to the second, and publish it.

Execute verify_repo_search() and verify_repo_download().

test_03_compare_repos()

Verify the two repositories contain the same content unit.

verify_repo_download(repo)

Download pulp_smash.constants.RPM from the given repo.

Verify that it is exactly equal to the one uploaded earlier.

Search for units in the given repo.

Verify that only one content unit is in repo, and that several of its metadata attributes are correct. This test targets Pulp #2365.

class pulp_smash.tests.rpm.api_v2.test_upload_publish.UploadSrpmTestCase(methodName='runTest')

Test whether one can upload a SRPM into a repository.

This test case targets Pulp Smash #402

classmethod setUpClass()

Import a SRPM into a repository and search it for content units.

Specifically, this method does the following:

  1. Create a yum repository.
  2. Upload a SRPM into the repository.
  3. Search for all content units in the repository.
test_srpm_file_name_is_correct()

Test if SRPM extracted correct metadata for creating filename.

test_srpm_uploaded_successfully()

Test if SRPM has been uploaded successfully.

test_status_code_units()

Verify the HTTP status code for repo units response.