pulp_2_tests.tests.rpm.api_v2.test_schedule_publish¶
Location: Pulp 2 Tests → Tests → pulp_2_tests.tests.rpm.api_v2.test_schedule_publish
Test the API’s schedule functionality for repository publication.
-
class
pulp_2_tests.tests.rpm.api_v2.test_schedule_publish.CreateFailureTestCase(*args, **kwargs)¶ Bases:
pulp_smash.pulp2.utils.BaseAPITestCaseEstablish 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.
-
classmethod
-
class
pulp_2_tests.tests.rpm.api_v2.test_schedule_publish.CreateSuccessTestCase(*args, **kwargs)¶ Bases:
pulp_smash.pulp2.utils.BaseAPITestCaseEstablish that we can create a schedule to publish the repository.
-
classmethod
setUpClass()¶ Create a schedule to publish the repository.
Do the following:
- Create a repository with a valid feed
- Sync it
- 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_countis sane.
-
classmethod
-
class
pulp_2_tests.tests.rpm.api_v2.test_schedule_publish.ReadUpdateDeleteTestCase(*args, **kwargs)¶ Bases:
pulp_smash.pulp2.utils.BaseAPITestCaseEstablish that we can read, update and delete schedules.
This test case assumes the assertions in
CreateSuccessTestCasehold 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.
-
classmethod
-
class
pulp_2_tests.tests.rpm.api_v2.test_schedule_publish.ScheduledPublishTestCase(*args, **kwargs)¶ Bases:
pulp_smash.pulp2.utils.BaseAPITestCaseEstablish that publish runs according to the specified schedule.
This test case assumes the assertions in
CreateSuccessTestCaseandReadUpdateDeleteTestCasehold true.-
classmethod
setUpClass()¶ Create a schedule to publish a repo, verify the
total_run_count.Do the following:
- Create a repository with a valid feed
- Sync it
- Schedule publish to run every 2 minutes
- 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.
-
classmethod