Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add puppet tests for syncing and publishing with puppet_distributor with
Tests in this commit check following pulp functionality: * It is possible to create two puppet repos, with and without feedURLs respectively (CreateTestCase), * Create repo with valid feed and run sync ends without errors for both valid and invalid query (SyncValidFeedTestCase), * Create repo with invalid feed and run sync ends with error (SyncInvalidFeedTestCase), * Following steps finish without errors (PublishTestCase) * Create two repositories: foo and bar. * upload custom puppet module to foo, * copy foo to bar and publish both, * query pulp server for modules using all query formats supported by given pulp version * download modules from their expected locations on pulp server file system, * verify integrity of downloaded modules. Sample output tested on machine with RedHat 7.1 and pulp 2.7 installed: $ python -m unittest2 -v pulp_smash.tests.puppet.api_v2.test_sync_publish test_id_notes (pulp_smash.tests.puppet.api_v2.test_sync_publish.CreateTestCase) Validate the ``id`` and ``notes`` attributes for each repo. ... ok test_importer_config (pulp_smash.tests.puppet.api_v2.test_sync_publish.CreateTestCase) Validate the ``config`` attribute of each importer. ... ok test_importer_type_id (pulp_smash.tests.puppet.api_v2.test_sync_publish.CreateTestCase) Validate the ``importer_type_id`` attribute of each importer. ... ok test_number_importers (pulp_smash.tests.puppet.api_v2.test_sync_publish.CreateTestCase) Each repository should have only one importer. ... ok test_call_reports_keys (pulp_smash.tests.puppet.api_v2.test_sync_publish.PublishTestCase) Verify each call report has the correct keys. ... ok test_call_reports_values (pulp_smash.tests.puppet.api_v2.test_sync_publish.PublishTestCase) Verify no call report contains any errors. ... ok test_sanity (pulp_smash.tests.puppet.api_v2.test_sync_publish.PublishTestCase) Verify we collected a correct set of response bodies. ... ok test_search_units (pulp_smash.tests.puppet.api_v2.test_sync_publish.PublishTestCase) Verify the two repositories have the same units. ... ok test_status_codes (pulp_smash.tests.puppet.api_v2.test_sync_publish.PublishTestCase) Verify the HTTP status code of each server response. ... ok test_units_integrity (pulp_smash.tests.puppet.api_v2.test_sync_publish.PublishTestCase) Verify integrity of modules downloaded from pulp server. ... ok test_upload (pulp_smash.tests.puppet.api_v2.test_sync_publish.PublishTestCase) Verify the response body for uploading module. ... ok test_upload_free (pulp_smash.tests.puppet.api_v2.test_sync_publish.PublishTestCase) Verify the response body for ending an upload request. ... ok test_upload_malloc (pulp_smash.tests.puppet.api_v2.test_sync_publish.PublishTestCase) Verify the response body for starting an upload request. ... ok test_error_details (pulp_smash.tests.puppet.api_v2.test_sync_publish.SyncInvalidFeedTestCase) Assert each task's progress report contains error details. ... ok test_number_tasks (pulp_smash.tests.puppet.api_v2.test_sync_publish.SyncInvalidFeedTestCase) Assert that only one task was spawned. ... ok test_start_sync_code (pulp_smash.tests.puppet.api_v2.test_sync_publish.SyncInvalidFeedTestCase) Assert the call to sync a repository returns an HTTP 202. ... ok test_task_error (pulp_smash.tests.puppet.api_v2.test_sync_publish.SyncInvalidFeedTestCase) Assert each task's "error" field is non-null. ... ok test_task_traceback (pulp_smash.tests.puppet.api_v2.test_sync_publish.SyncInvalidFeedTestCase) Assert each task's "traceback" field is non-null. ... ok test_start_sync_code (pulp_smash.tests.puppet.api_v2.test_sync_publish.SyncValidFeedTestCase) Assert the call to sync each repository returns an HTTP 202. ... ok test_task_error (pulp_smash.tests.puppet.api_v2.test_sync_publish.SyncValidFeedTestCase) Assert each task's "error" field is null. ... ok test_task_progress_report (pulp_smash.tests.puppet.api_v2.test_sync_publish.SyncValidFeedTestCase) Assert no task's progress report contains error details. ... ok test_task_traceback (pulp_smash.tests.puppet.api_v2.test_sync_publish.SyncValidFeedTestCase) Assert each task's "traceback" field is null. ... ok ---------------------------------------------------------------------- Ran 22 tests in 41.743s OK
- Loading branch information