pulp_smash.tests.rpm.api_v2.test_service_resiliency

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

Test the resiliency of Pulp’s services.

Pulp is designed to be resilient. It should be possible for a service to disappear and reappear, with the only consequence being slower processing of tasks. This module has tests for Pulp’s resilience in the face of such issues.

class pulp_smash.tests.rpm.api_v2.test_service_resiliency.MissingWorkersTestCase(methodName='runTest')

Test that Pulp deals well with missing workers.

When executed, this test case will do the following:

  1. Ensure there is only one Pulp worker.
  2. Create a repository. Let its feed reference a large repository. (For example, EPEL.)
  3. Start a sync. Immediately restart the pulp_workers service. (It’s important that pulp_workers be restarted, not started and stopped. For details, see Pulp #2835.) This should cause the first sync to abort.
  4. Update the repository. Let its feed reference a small repository. (For example, pulp_smash.constants.RPM_UNSIGNED_FEED_URL.)
  5. Start a sync. Verify that it completes. If Pulp #2835 still affects Pulp, then the worker will be broken, and the sync will never start.
setUp()

Ensure there is only one Pulp worker.

tearDown()

Reset the number of Pul pworkers, and reset Pulp.

Reset Pulp because test_all() may break Pulp.

test_all()

Test that Pulp deals well with missing workers.