pulp_2_tests.tests.rpm.api_v2.test_crud¶
Location: Pulp 2 Tests → Tests → pulp_2_tests.tests.rpm.api_v2.test_crud
Tests that CRUD RPM repositories.
For information on repository CRUD operations, see Creation, Deletion and Configuration.
-
class
pulp_2_tests.tests.rpm.api_v2.test_crud.CrudTestCase(*args, **kwargs)¶ Bases:
pulp_smash.pulp2.utils.BaseAPICrudTestCaseCRUD a minimal RPM repository.
-
static
create_body()¶ Return a dict for creating a repository.
-
static
update_body()¶ Return a dict for updating a repository.
-
static
-
class
pulp_2_tests.tests.rpm.api_v2.test_crud.CrudWithFeedTestCase(*args, **kwargs)¶ Bases:
pulp_2_tests.tests.rpm.api_v2.test_crud.CrudTestCaseCRUD an RPM repository with a feed URL.
-
static
create_body()¶ Return a dict for creating a repository.
-
static
-
class
pulp_2_tests.tests.rpm.api_v2.test_crud.FeedURLUnquoteTestCase(*args, **kwargs)¶ Bases:
pulp_smash.pulp2.utils.BaseAPITestCaseCheck that feed URLs are unquoted.
See https://pulp.plan.io/issues/2520.
-
test_all()¶ Ensure Pulp unquote feed URLs.
-
-
class
pulp_2_tests.tests.rpm.api_v2.test_crud.LastUnitAddedTestCase(*args, **kwargs)¶ Bases:
pulp_smash.pulp2.utils.BaseAPITestCaseTests for ensuring proper last_unit_added behavior.
-
setUp()¶ Perform common set-up tasks.
-
test_update_on_copy()¶ Check if copying units into a repo updates
last_unit_added.Do the following:
- Create a repository with a feed and sync it.
- Create a second repository. Assert the second repository’s
last_unit_addedattribute is null. - Copy a content unit from first repository to the second. Assert the
second repository’s
last_unit_addedattribute is non-null. - Publish the second repository. Assert its
last_unit_addedattribute is non-null.
-
test_update_on_sync()¶ Check if syncing a repo updates
last_unit_added.Do the following:
- Create a repository with a feed.
- Assert the repository’s
last_unit_addedattribute is null. - Sync the repository.
- Assert the repository’s
last_unit_addedattribute is non-null.
-
-
class
pulp_2_tests.tests.rpm.api_v2.test_crud.NonExistentRepoTestCase(methodName='runTest')¶ Bases:
unittest.case.TestCasePerform actions on non-existent repositories.
This test targets Pulp Smash #157.
-
setUp()¶ Set variables used by each test case.
-
test_delete()¶ Delete a non-existent repository.
-
test_update()¶ Update a non-existent repository.
-
-
class
pulp_2_tests.tests.rpm.api_v2.test_crud.PulpDistributionTestCase(*args, **kwargs)¶ Bases:
pulp_smash.pulp2.utils.BaseAPITestCaseCheck if a feed with PULP_DISTRIBUTION.xml syncs properly.
See https://pulp.plan.io/issues/1086
-
test_all()¶ Check for content synced from a feed with PULP_DISTRIBUTION.xml.
-
-
class
pulp_2_tests.tests.rpm.api_v2.test_crud.RPMDistributorTestCase(methodName='runTest')¶ Bases:
unittest.case.TestCaseRPM distributor tests.
-
test_update_checksum_type()¶ Check if RPM distributor can receive null checksum_type.
-
-
class
pulp_2_tests.tests.rpm.api_v2.test_crud.RepositoryGroupCrudTestCase(*args, **kwargs)¶ Bases:
pulp_smash.pulp2.utils.BaseAPITestCaseCRUD a minimal RPM repositories’ groups.
For information on repositories’ groups CRUD operations, see Creation, Delete, and Update <http://docs.pulpproject.org/en/latest/dev-guide/integration/rest-api/repo/groups/cud.html>
-
classmethod
setUpClass()¶ Create, update, read and delete a repository group.
-
test_create()¶ Assert the created repository group has all requested attributes.
Walk through each of the attributes present on the create body and verify the attribute is present in the repository group.
-
test_read()¶ Assert the repo group update response has the requested changes.
-
test_status_codes()¶ Assert each response has a correct status code.
-
test_update()¶ Assert the repo group update response has the requested changes.
-
classmethod