pulp_smash.tests.docker.api_v2.test_tags

Location: Pulp SmashAPI Documentationpulp_smash.tests.docker.api_v2.test_tags

Tests that work with tags on docker repositories.

class pulp_smash.tests.docker.api_v2.test_tags.DockerTagTestCase(methodName='runTest')

Tests for docker repository tagging feature.

get_latest_tags()

Return all tags in this test’s repo with a name of “latest”.

Starting with Pulp 2.13, docker schema v2 is supported. As a result, a tag or manifest may be included in search results twice, with a differing schema_version. For convenience, if the Pulp system under test is version 2.13 or newer, only schema v1 is targeted. (The choice of schema version 1 is arbitrary.) See Pulp #2099.

Returns:A list of docker tags.
get_manifests()

Return all manifests in this test’s repo.

If the Pulp system under test is version 2.13 or newer, only return schema v1 manifests. See get_latest_tags().

setUp()

Create and sync a docker repository.

test_create_tag()

Check if a tag can be created.

test_update_tag()

Check if a tag can be updated to a new manifest.

Do the following:

  1. Find the tag in this test’s docker repository whose name is “latest.” Make note of the manifest it references.
  2. Pick some other manifest. Update the repository so that the “latest” tag references the chosen manifest.
  3. Find the tag in this test’s docker repository whose name is “latest.” Assert it references the chosen manifest.
test_update_tag_another_repo()

Check if tagging fail for a manifest from another repo.

test_update_tag_invalid_manifest()

Check if tagging fail for a invalid manifest.

pulp_smash.tests.docker.api_v2.test_tags.create_docker_repo(cfg, upstream_name, use_v1=False)

Create a docker repository.

Parameters:
  • cfg (pulp_smash.config.PulpSmashConfig) – Information about a Pulp host.
  • upstream_name – The Docker container upstream name.
  • use_v1 – If True use Docker V1 feed URL else use Docker V2 feed URL.
Returns:

Detailed information about the created repository.

pulp_smash.tests.docker.api_v2.test_tags.import_upload(cfg, repo, params)

Create or update a docker repository.

Parameters:
  • cfg (pulp_smash.config.PulpSmashConfig) – Information about a Pulp host.
  • repo – A dict of information about the targed repository.
  • params – A dict of information to pass as import_upload body.
Returns:

A dict of information about the creation/update report.

pulp_smash.tests.docker.api_v2.test_tags.setUpModule()

Skip tests on Pulp versions lower than 2.12.