pulp_smash.tests.ostree.api_v2.test_crud

Location: Pulp SmashAPI Documentationpulp_smash.tests.ostree.api_v2.test_crud

Test the CRUD API endpoints OSTree repositories.

This module assumes that the tests in pulp_smash.tests.platform.api_v2.test_repository hold true. The following trees of assumptions are explored in this module:

It is possible to create an OSTree repo with feed (CreateTestCase).
It is possible to create a repository without a feed (CreateTestCase).
  It is possible to create distributors for a repo
    It is not possible to create distributors to have conflicting paths
    It is not possible to update distrubutors to have conflicting paths
class pulp_smash.tests.ostree.api_v2.test_crud.CreateDistributorsTestCase(methodName='runTest')

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_smash.tests.ostree.api_v2.test_crud.CrudTestCase(methodName='runTest')

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_smash.tests.ostree.api_v2.test_crud.CrudWithFeedTestCase(methodName='runTest')

CRUD an OSTree repository with a feed.

static create_body()

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

class pulp_smash.tests.ostree.api_v2.test_crud.UpdateDistributorsTestCase(methodName='runTest')

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.