Location: Pulp SmashAPI Documentationpulp_smash.tests.pulp2.docker.utils

Utilities for Docker tests.


Return a Docker upstream name.

Return pulp_smash.constants.DOCKER_UPSTREAM_NAME_NOLIST if Pulp is older than version 2.14. Otherwise, return pulp_smash.constants.DOCKER_UPSTREAM_NAME. See the documentation for those constants for more information.

pulp_smash.tests.pulp2.docker.utils.os_is_f26(cfg, pulp_host=None)

Tell whether the given Pulp host’s OS is F26.


Skip tests if Pulp 2 isn’t under test or if Docker isn’t installed.

pulp_smash.tests.pulp2.docker.utils.skip_if = functools.partial(<function skip_if>, exc=<class 'unittest.case.SkipTest'>)

The @skip_if decorator, customized for unittest.

pulp_smash.selectors.skip_if() is test runner agnostic. This function is identical, except that exc has been set to unittest.SkipTest.

pulp_smash.tests.pulp2.docker.utils.write_manifest_list(cfg, manifest_list)

Write out a content source to JSON file.

  • cfg (pulp_smash.config.PulpSmashConfig) – The Pulp deployment on which to create a repository.
  • manifest_list – A detailed dict of information about the manifest list.

The path to created file, and the path to dir that stores the file.