pulp_2_tests.tests.puppet.api_v2.test_sync_publish¶
Location: Pulp 2 Tests → Tests → pulp_2_tests.tests.puppet.api_v2.test_sync_publish
Test the API endpoints for puppet repositories.
-
class
pulp_2_tests.tests.puppet.api_v2.test_sync_publish.
CreateTestCase
(*args, **kwargs)¶ Bases:
pulp_smash.pulp2.utils.BaseAPITestCase
Create two puppet repos, with and without feed URLs respectively.
-
classmethod
setUpClass
()¶ Create two puppet repositories, with and without feed URLs.
-
test_id_notes
()¶ Validate the
id
andnotes
attributes for each repo.
-
test_importer_config
()¶ Validate the
config
attribute of each importer.
-
test_importer_type_id
()¶ Validate the
importer_type_id
attribute of each importer.
-
test_number_importers
()¶ Each repository should have only one importer.
-
classmethod
-
class
pulp_2_tests.tests.puppet.api_v2.test_sync_publish.
PublishTestCase
(*args, **kwargs)¶ Bases:
pulp_smash.pulp2.utils.BaseAPITestCase
Test repository syncing, publishing and data integrity.
Test uploading custom puppet module to repository, copying content between repositories, querying puppet modules from pulp server and integrity of downloaded modules. Three query formats are tested as are provided by different puppet versions:
- puppet version <= 3.3
- 3.3 < puppet version < 3.6
- puppet version > 3.6
-
classmethod
setUpClass
()¶ Upload puppet module to a repo, copy it to another, publish and download.
Create two puppet repositories, both without feeds. Upload an module to the first repository. Copy its content to the second repository. Add distributors to the repositories, publish repositories and download modules back from them.
-
test_call_report_errors
()¶ Verify each call report is error-free.
-
test_call_report_keys
()¶ Verify each call report has a sane structure.
-
test_free
()¶ Verify the response body for ending an upload.
-
test_malloc
()¶ Verify the response body for creating an upload request.
-
test_publish_errors
()¶ Verify publishing a call report doesn’t generate any errors.
-
test_publish_keys
()¶ Verify publishing a repository generates a call report.
-
test_repo_units_consistency
()¶ Verify the two puppet repositories have the same content units.
-
test_status_code
()¶ Verify the HTTP status code of each server response.
-
test_unit_integrity
()¶ Verify the integrity of the puppet modules downloaded from Pulp.
-
test_upload
()¶ Verify the response body for uploading bits.
-
class
pulp_2_tests.tests.puppet.api_v2.test_sync_publish.
SyncInvalidFeedTestCase
(*args, **kwargs)¶ Bases:
pulp_smash.pulp2.utils.BaseAPITestCase
If an invalid feed is given a sync should complete with errors.
-
classmethod
setUpClass
()¶ Create a puppet repository with an invalid feed and sync it.
-
test_error_details
()¶ Assert each task’s progress report contains error details.
-
test_number_tasks
()¶ Assert only one task was spawned.
-
test_status_code
()¶ Assert the call to sync a repository returns an HTTP 202.
-
test_task_error_traceback
()¶ Assert the task’s “error” and “traceback” fields are non-null.
-
classmethod
-
class
pulp_2_tests.tests.puppet.api_v2.test_sync_publish.
SyncNoFeedTestCase
(*args, **kwargs)¶ Bases:
pulp_smash.pulp2.utils.BaseAPITestCase
Create and sync a puppet repository with no feed.
At least one of the sync tasks should fail. The task should fail in a graceful manner, without e.g. an internal tracebacks. This test targets Pulp #2628.
-
test_all
()¶ Create and sync a puppet repository with no feed.
-
-
class
pulp_2_tests.tests.puppet.api_v2.test_sync_publish.
SyncValidFeedTestCase
(*args, **kwargs)¶ Bases:
pulp_smash.pulp2.utils.BaseAPITestCase
Create and sync puppet repositories with valid feeds.
-
test_matching_query
()¶ Sync a repository with a query that matches units.
Assert that:
- None of the sync tasks has an error message.
- Searching for module
pulp_2_tests.constants.PUPPET_MODULE_2
yields one result. - The synced-in module can be downloaded.
-
test_non_matching_query
()¶ Sync a repository with a query that doesn’t match any units.
Assert that:
- None of the sync tasks has an error message.
- Searching for module
pulp_2_tests.constants.PUPPET_MODULE_2
yields no results.
-
-
class
pulp_2_tests.tests.puppet.api_v2.test_sync_publish.
SyncValidManifestFeedTestCase
(*args, **kwargs)¶ Bases:
pulp_smash.pulp2.utils.BaseAPITestCase
A valid Puppet manifest should sync correctly.
-
classmethod
setUpClass
()¶ Create repository with the feed pointing to a valid manifest.
-
test_number_tasks
()¶ Assert only one task was spawned.
-
test_status_code
()¶ Assert the call to sync a repository returns an HTTP 202.
-
test_task_progress_report
()¶ Assert each task’s progress report shows no errors.
-
classmethod