pulp_smash.tests.pulp3.file.api_v3.test_repo_version

Location: Pulp SmashAPI Documentationpulp_smash.tests.pulp3.file.api_v3.test_repo_version

Tests related to repository version.

class pulp_smash.tests.pulp3.file.api_v3.test_repo_version.AddRemoveContentTestCase(methodName='runTest')

Add and remove content to a repository. Verify side-effects.

A new repository version is automatically created each time content is added to or removed from a repository. Furthermore, it’s possible to inspect any repository version and discover which content is present, which content was removed, and which content was added. This test case explores these features.

This test targets the following issues:

get_content_summary(repo)

Get the content_summary for the given repository.

classmethod setUpClass()

Create class-wide variables.

classmethod tearDownClass()

Destroy resources created by test methods.

test_01_create_repository()

Create a repository.

Assert that:

  • The _versions_href API call is correct.
  • The _latest_version_href API call is correct.
test_02_sync_content()

Sync content into the repository.

Assert that:

  • The _versions_href API call is correct.
  • The _latest_version_href API call is correct.
  • The _latest_version_href + content/ API call is correct.
  • The _latest_version_href + added_content/ API call is correct.
  • The _latest_version_href + removed_content/ API call is correct.
  • The content_summary attribute is correct.
test_03_remove_content()

Remove content from the repository.

Make roughly the same assertions as test_02_sync_content().

test_04_add_content()

Add content to the repository.

Make roughly the same assertions as test_02_sync_content().

class pulp_smash.tests.pulp3.file.api_v3.test_repo_version.AddRemoveRepoVersionTestCase(methodName='runTest')

Create and delete repository versions.

This test targets the following issues:

setUp()

Create a repository and give it nine new versions.

classmethod setUpClass()

Add content to Pulp.

test_delete_first_version()

Delete the first repository version.

test_delete_last_version()

Delete the last repository version.

Create a new repository version from the second-to-last repository version. Verify that the content unit from the old last repository version is not in the new last repository version.

test_delete_middle_version()

Delete a middle version.

test_delete_publication()

Delete a publication.

Delete a repository version, and verify the associated publication is also deleted.

class pulp_smash.tests.pulp3.file.api_v3.test_repo_version.ContentImmutableRepoVersionTestCase(methodName='runTest')

Test whether the content present in a repo version is immutable.

This test targets the following issue:

test_all()

Test whether the content present in a repo version is immutable.

Do the following:

  1. Create a repository that has at least one repository version.
  2. Attempt to update the content of a repository version.
  3. Assert that an HTTP exception is raised.
  4. Assert that the repository version was not updated.