pulp_2_tests.tests.rpm.utils

Location: Pulp 2 TestsTestspulp_2_tests.tests.rpm.utils

Utilities for RPM tests.

pulp_2_tests.tests.rpm.utils.check_issue_2277(cfg)

Return true if Pulp #2277 affects the targeted Pulp system.

Parameters:cfg – The Pulp system under test.
pulp_2_tests.tests.rpm.utils.check_issue_2354(cfg)

Return true if Pulp #2354 affects the targeted Pulp system.

Parameters:cfg – The Pulp system under test.
pulp_2_tests.tests.rpm.utils.check_issue_2387(cfg)

Return true if Pulp #2387 affects the targeted Pulp system.

Parameters:cfg – The Pulp system under test.
pulp_2_tests.tests.rpm.utils.check_issue_2620(cfg)

Return true if Pulp #2620 affects the targeted Pulp system.

Parameters:cfg – The Pulp system under test.
pulp_2_tests.tests.rpm.utils.check_issue_2798(cfg)

Return true if Pulp #2798 affects the targeted Pulp system.

Parameters:cfg – The Pulp system under test.
pulp_2_tests.tests.rpm.utils.check_issue_2844(cfg)

Return true if Pulp #2844 affects the targeted Pulp system.

Parameters:cfg – The Pulp system under test.
pulp_2_tests.tests.rpm.utils.check_issue_3104(cfg)

Return true if Pulp #3104 affects the targeted Pulp system.

Parameters:cfg – The Pulp system under test.
pulp_2_tests.tests.rpm.utils.check_issue_3875(cfg)

Return true if Pulp #3875 affects the targeted Pulp system.

Parameters:cfg – The Pulp system under test.
pulp_2_tests.tests.rpm.utils.check_issue_3876(cfg)

Return true if Pulp #3876 affects the targeted Pulp system.

Parameters:cfg – The Pulp system under test.
pulp_2_tests.tests.rpm.utils.check_issue_4405(cfg)

Return true if Pulp #4405 affects the targeted Pulp system.

Parameters:cfg – The Pulp system under test.
pulp_2_tests.tests.rpm.utils.check_issue_4529(cfg)

Return true if Pulp #4529 affects the targeted Pulp system.

Parameters:cfg – The Pulp system under test.
pulp_2_tests.tests.rpm.utils.gen_yum_config_file(cfg, repositoryid, baseurl, name, **kwargs)

Generate a yum configuration file and write it to /etc/yum.repos.d/.

Generate a yum configuration file containing a single repository section, and write it to /etc/yum.repos.d/{repositoryid}.repo.

Parameters:
  • cfg – The system on which to create a yum configuration file.
  • repositoryid – The section’s repositoryid. Used when naming the configuration file and populating the brackets at the head of the file. For details, see yum.conf(5).
  • baseurl – The required option baseurl specifying the url of repo. For details, see yum.conf(5)
  • name – The required option name specifying the name of repo. For details, see yum.conf(5).
  • kwargs – Section options. Each kwarg corresponds to one option. For details, see yum.conf(5).
Returns:

The path to the yum configuration file.

pulp_2_tests.tests.rpm.utils.os_is_f26(cfg, pulp_host=None)

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

pulp_2_tests.tests.rpm.utils.os_is_f27(cfg, pulp_host=None)

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

pulp_2_tests.tests.rpm.utils.os_is_f28(cfg, pulp_host=None)

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

pulp_2_tests.tests.rpm.utils.os_is_rhel6(cfg)

Return True if the server runs RHEL 6, or False otherwise.

Parameters:cfg – Information about the system being targeted.
Returns:True or false.
pulp_2_tests.tests.rpm.utils.os_support_modularity(cfg, pulp_host=None)

Return True if the server supports modularity, or False otherwise.

Parameters:cfg – Information about the system being targeted.
Returns:True or False.
pulp_2_tests.tests.rpm.utils.rpm_rich_weak_dependencies(cfg)

Return True if the Pulp host supports RPM rich/weak dependencies.

False otherwise.

Weak dependencies

RPM 4.12 added support for specifying weak dependencies (Recommends, Suggests, Supplements and Enhances) tags in spec.

Parameters:cfg – Information about the system.
Returns:True or False.
pulp_2_tests.tests.rpm.utils.set_up_module()

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

pulp_2_tests.tests.rpm.utils.skip_if(func, var_name, result, *, 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.