pulp_smash.tests.rpm.api_v2.test_iso_crud

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

Test CRUD for ISO RPM repositories.

class pulp_smash.tests.rpm.api_v2.test_iso_crud.AddImporterDistributorTestCase(methodName='runTest')

Add an importer and a distributor to an existing untyped repository.

See:

classmethod setUpClass()

Create a repository and add an importer and distributor to it.

Do the following:

  1. Create a repository.
  2. Read the repository’s importers and distributors.
  3. Add an importer and distributor to the repo.
  4. Re-read the repository’s importers and distributors.
test_add_distributor()

Check the HTTP status code for adding a distributor.

test_add_importer()

Check the HTTP status code for adding an importer.

test_after()

Verify the repository ends up with one importer and distributor.

test_before()

Verify the repository has no importer or distributors initially.

class pulp_smash.tests.rpm.api_v2.test_iso_crud.CreateTestCase(methodName='runTest')

Create an ISO RPM repo with an importer and distributor.

classmethod setUpClass()

Create an ISO RPM repo with an importer and distributor.

test_attributes()

Assert the created repository has the requested attributes.

test_headers_location()

Assert the response’s Location header is correct.

The Location may be either an absolute or relative URL. See pulp_smash.tests.platform.api_v2.test_repository.CreateSuccessTestCase.test_location_header().

test_status_code()

Assert the response has an HTTP 201 status code.

class pulp_smash.tests.rpm.api_v2.test_iso_crud.PulpManifestTestCase(methodName='runTest')

Ensure ISO repo properly handles PULP_MANIFEST information.

static parse_pulp_manifest(feed_url)

Parse PULP_MANIFEST information from feed_url/PULP_MANIFEST.

Parameters:feed_url – The URL for the file feed. It will be joined with /PULP_MANIFEST in order to find the PULP_MANIFEST file.
Returns:A list of dicts mapping each PULP_MANIFEST row. The dict contains the keys name, checksum and size which represent the PULP_MANIFEST data.
test_invalid_file_feed()

Create and sync a ISO repo from an invalid file feed.

Assert that the sync fails with the information that some units were not available.

test_valid_file_feed()

Create and sync a ISO repo from a file feed.

Assert that the number of units synced is the same as PULP_MANIFEST lists.

class pulp_smash.tests.rpm.api_v2.test_iso_crud.ReadUpdateDeleteTestCase(methodName='runTest')

Establish that we can interact with typed repositories as expected.

classmethod setUpClass()

Create three repositories and read, update and delete them.

test_read()

Assert that the “read” call returns correct attributes.

test_read_distributors()

Assert each read w/distributors contains info about distributors.

test_read_importers()

Assert each read with importers contains info about importers.

test_status_code()

Assert each response has a correct HTTP status code.