pulp_smash.tests.rpm.api_v2.test_schedule_publish

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

Test the API’s schedule functionality for repository publication.

This module assumes that the tests in pulp_smash.tests.platform.api_v2.test_repository and pulp_smash.tests.rpm.api_v2.test_sync_publish hold true.

class pulp_smash.tests.rpm.api_v2.test_schedule_publish.CreateFailureTestCase(methodName='runTest')

Establish that schedules are not created in documented scenarios.

classmethod setUpClass()

Create several schedules.

Each schedule is created to test a different failure scenario.

test_status_code()

Assert that each response has the expected HTTP status code.

class pulp_smash.tests.rpm.api_v2.test_schedule_publish.CreateSuccessTestCase(methodName='runTest')

Establish that we can create a schedule to publish the repository.

classmethod setUpClass()

Create a schedule to publish the repository.

Do the following:

  1. Create a repository with a valid feed
  2. Sync it
  3. Schedule publish to run every 30 seconds
test_is_enabled()

Check if sync is enabled.

test_status_code()

Assert the response has an HTTP 201 status code.

test_total_run_count()

Check that total_run_count is sane.

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

Establish that we can read, update and delete schedules.

This test case assumes the assertions in CreateSuccessTestCase hold true.

classmethod setUpClass()

Create three schedules and read, update and delete them.

test_read_many()

Assert the “read_many” response body contains all schedules.

test_read_one()

Assert the “read_one” response contains the correct attributes.

test_status_code()

Assert each response has a correct HTTP status code.

test_update()

Assert the “update” response body has the correct attributes.

class pulp_smash.tests.rpm.api_v2.test_schedule_publish.ScheduledPublishTestCase(methodName='runTest')

Establish that publish runs according to the specified schedule.

This test case assumes the assertions in CreateSuccessTestCase and ReadUpdateDeleteTestCase hold true.

classmethod setUpClass()

Create a schedule to publish a repo, verify the total_run_count.

Do the following:

  1. Create a repository with a valid feed
  2. Sync it
  3. Schedule publish to run every 2 minutes
  4. Wait for 130 seconds and read the schedule to get the number of “publish” runs
test_no_failure()

Make sure any failure ever happened.

test_total_run_count()

Check for the expected total run count.