pulp_2_tests.tests.ostree.api_v2.test_crud

Location: Pulp 2 TestsTestspulp_2_tests.tests.ostree.api_v2.test_crud

Test the CRUD API endpoints OSTree repositories.

class pulp_2_tests.tests.ostree.api_v2.test_crud.CreateDistributorsTestCase(*args, **kwargs)

Bases: pulp_smash.pulp2.utils.BaseAPITestCase

Show Pulp can create OSTree distributors and prevent path conflicts.

This test case targets:

classmethod setUpClass()

Create a pair of repositories.

Ensure the first repo has a distributor with a relative path. Succeeding tests will give the second repository distributors with relative paths, where those paths may or may not conflict with the first repository’s distributor’s relative path. This test splits the distributors across two repositories to ensure that Pulp correctly checks new relative paths against the existing relative paths in all repositories.

test_invalid_v1()

Create a distributor whose relative path is invalid.

Re-use the same relative path. For example, if an existing relative path is foo/bar, then this relative path would be foo/bar.

test_invalid_v2()

Create a distributor whose relative path is invalid.

Extend an existing relative path. For example, if an existing relative path is foo/bar, then this relative path would be foo/bar/biz.

test_invalid_v3()

Create a distributor whose relative path is invalid.

Prepend a slash onto an existing relative path. For example, if an existing relative path is foo/bar, then this relative path would be /foo/bar.

test_valid_v1()

Create a distributor whose relative path is valid.

Create a unique relative path. For example, if an existing relative path is foo/bar, then this relative path might be biz/baz.

test_valid_v2()

Create a distributor whose relative path is valid.

Create a relative path that contains three segments. Most other tests in this module have relative paths with two segments.

class pulp_2_tests.tests.ostree.api_v2.test_crud.CrudTestCase(*args, **kwargs)

Bases: pulp_smash.pulp2.utils.BaseAPICrudTestCase

CRUD a minimal OSTree repository.

static create_body()

Return a dict for creating a repository.

static update_body()

Return a dict for creating a repository.

class pulp_2_tests.tests.ostree.api_v2.test_crud.CrudWithFeedTestCase(*args, **kwargs)

Bases: pulp_2_tests.tests.ostree.api_v2.test_crud.CrudTestCase

CRUD an OSTree repository with a feed.

static create_body()

Return a dict, with a feed, for creating a repository.

class pulp_2_tests.tests.ostree.api_v2.test_crud.UpdateDistributorsTestCase(*args, **kwargs)

Bases: pulp_smash.pulp2.utils.BaseAPITestCase

Test the update of ostree distributors.

This test case targets:

classmethod setUpClass()

Create a pair of repositories.

Ensure each repo has a distributor with a relative path. Succeeding tests will update the second repository’s distributor with varying relative paths, where those paths may or may not conflict with the first repository’s distributor’s relative path. This test splits the distributors across two repositories to ensure that Pulp correctly checks new relative paths against the existing relative paths in all repositories.

test_invalid_v1()

Update a distributor’s relative path with an invalid value.

Re-use an existing relative path. For example, if an existing relative path is foo/bar, then this relative path would be foo/bar.

test_invalid_v2()

Update a distributor’s relative path with an invalid value.

Extend an existing relative path. For example, if an existing relative path is foo/bar, then this relative path would be foo/bar/biz.

test_invalid_v3()

Update a distributor’s relative path with an invalid value.

Prepend a slash to an existing relative path. For example, if an existing relative path is foo/bar, then this relative path would be /foo/bar.

test_valid_v1()

Update a distributor’s relative path with a valid value.

Use a unique value for the new relative path. For example, if an existing relative path is foo/bar, then the new relative path might be biz/baz.

test_valid_v2()

Update a distributor’s relative path with a valid value.

Use a three-segment value for the new relative path. Most other tests in this module have relative paths with two segments.

class pulp_2_tests.tests.ostree.api_v2.test_crud.UpdateImportersTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Test the update of ostree importers.

This test targets the following issues:

test_all()

Test the update of ostree importers.

Do the following:

  1. Create a repository.
  2. Update the importer associated with the repository.
  3. Perform assertions about the just updated importer.