pulp_2_tests.tests.platform.api_v2.test_consumer

Location: Pulp 2 TestsTestspulp_2_tests.tests.platform.api_v2.test_consumer

Test the consumer API endpoints.

class pulp_2_tests.tests.platform.api_v2.test_consumer.BindConsumerTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Show that one can bind a consumer to a repository.

test_all()

Bind a consumer to a distributor.

Do the following:

  1. Create a repository with a distributor.
  2. Create a consumer.
  3. Bind the consumer to the distributor.

Assert that:

  • The response has an HTTP 200 status code.
  • The response body contains the correct values.
class pulp_2_tests.tests.platform.api_v2.test_consumer.RegisterAndUpdateConsumerTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Show that one can register and update a consumer.

The call to consumer register api should return a x.509 certificate, that should be useful in updating a consumer and for other actions.

test_all()

Register and Update a consumer.

Do the following:

  1. Register a consumer with the consumer API
  2. Save the certificate returned in the response
  3. Update the same consumer with new details by using the client certificates

Assert that:

  • The response for registering a consumer has a x.509 certificate.
  • The response body contains the correct values.

Refer: