1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/tests/unit/plugins/modules
Pino Toscano 867704dd75
rhsm_repository: refactor handling of subscription-manager (#6783)
Create a small helper class Rhsm, so all the logic related to the
interaction with subscription-manager is grouped there:
- create the Rhsm object in main(), once the initial checks are done
- search subscription-manager as required (so there is no need to
  manually check it), and store its path for reuse
- store the common arguments for running subscription-manager
- move run_subscription_manager() to Rhsm as run_repos()
- get rid of the different list parameters: we list only all the
  repositories, so the other cases are not needed (and can be added
  easily, if needed)
- move get_repository_list() to Rhsm as list_repositories()

The execution of subscription-manager is improved as well:
- pass the arguments to run_command() directly as list, rather than
  joining the arguments to string, which run_command() will need to
  split again
- move the "repos" parameter directly in run_repos()
- explicitly disable the shell, already off by default
- disable the expansions of variables, as there are none

Adapt the unit test to the different way run_command() is called.

There should be no behaviour changes.
2023-07-02 21:44:53 +02:00
..
interfaces_file Interfaces file spaces fix (#6131) 2023-03-09 20:09:13 +01:00
conftest.py Make sure that plugins/module_utils/deps.py is cleaned up before every test (#6459) 2023-04-29 21:46:12 +02:00
FakeAnsibleModule.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
FakeXenAPI.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
gitlab.py Add Gitlab group runners support (#3935) 2023-03-25 08:23:20 +01:00
hpe_test_utils.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
linode_conftest.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
oneview_conftest.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
oneview_module_loader.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
rhn_conftest.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_alerta_customer.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_apache2_module.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_apk.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_archive.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_bitbucket_access_key.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_bitbucket_pipeline_key_pair.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_bitbucket_pipeline_known_host.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_bitbucket_pipeline_variable.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_campfire.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_circonus_annotation.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_cpanm.py cpanm: using CmdRunner (#5485) 2022-11-07 20:15:00 +01:00
test_datadog_downtime.py.disabled Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_dconf.py dconf: Check for changes properly despite style of quotes used by user (#6049) 2023-03-04 20:51:50 +01:00
test_discord.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_dnsimple.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_dnsimple_info.py dnsimple_info: remove extraneous importorskip from test (#6439) 2023-04-28 10:05:24 +02:00
test_gconftool2.py gconftool2: fix change output (#6270) 2023-05-03 22:45:35 +02:00
test_gconftool2_info.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_gem.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_github_repo.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_gitlab_deploy_key.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_gitlab_group.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_gitlab_hook.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_gitlab_project.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_gitlab_protected_branch.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_gitlab_runner.py Add Gitlab group runners support (#3935) 2023-03-25 08:23:20 +01:00
test_gitlab_user.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_homebrew.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_homebrew_cask.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_icinga2_feature.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_ipa_otpconfig.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_ipa_otptoken.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_ipa_pwpolicy.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_ipbase.py Add ipbase_info module (#6477) 2023-05-09 19:48:29 +02:00
test_java_keystore.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_jenkins_build.py Fix a logical flaw when deleting a build in the jenkins_build module (#5514) 2022-11-10 21:18:01 +01:00
test_jenkins_plugin.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_keycloak_authentication.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_keycloak_authentication_required_actions.py Keycloak: Authentication required actions management (#6732) 2023-06-20 19:18:26 +02:00
test_keycloak_client.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_keycloak_client_rolemapping.py keycloak_client_rolemapping.py: add support for subgroups (#6687) 2023-06-18 19:49:00 +02:00
test_keycloak_clientscope.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_keycloak_identity_provider.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_keycloak_realm.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_keycloak_realm_info.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_keycloak_role.py Inspq keycloak role composites (#6469) 2023-06-15 06:57:30 +02:00
test_keycloak_user.py Inspq keycloak user module (#6476) 2023-06-09 06:17:44 +02:00
test_keycloak_user_federation.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_linode.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_linode_v4.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_lvg_rename.py lvg_rename: New module to support VG renaming (#6721) 2023-06-19 13:11:03 +02:00
test_lxca_cmms.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_lxca_nodes.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_macports.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_maven_artifact.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_modprobe.py add persistent option for modprobe (#5424) 2023-02-26 14:58:58 +01:00
test_monit.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_nmcli.py nmcli: Fix bond option xmit_hash_policy (#6527) 2023-05-21 17:03:38 +02:00
test_npm.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_ocapi_command.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_ocapi_info.py Remote management modules for OCAPI-based devices. (#5754) 2023-01-22 17:10:36 +01:00
test_one_vm.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_oneview_datacenter_info.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_oneview_enclosure_info.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_oneview_ethernet_network.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_oneview_ethernet_network_info.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_oneview_fc_network.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_oneview_fc_network_info.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_oneview_fcoe_network.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_oneview_fcoe_network_info.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_oneview_logical_interconnect_group.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_oneview_logical_interconnect_group_info.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_oneview_network_set.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_oneview_network_set_info.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_oneview_san_manager.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_oneview_san_manager_info.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_opkg.py opkg: fix bug when update_cache=true (#6119) 2023-03-02 07:01:15 +01:00
test_pacman.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_pacman_key.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_pagerduty.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_pagerduty_alert.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_pagerduty_change.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_pamd.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_parted.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_pkgin.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_pmem.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_pritunl_org.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_pritunl_org_info.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_pritunl_user.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_pritunl_user_info.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_proxmox_kvm.py proxmox_kvm - Allow creation of VM with existing name but new vmid (#6709) 2023-06-19 07:01:58 +02:00
test_proxmox_snap.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_proxmox_tasks_info.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_puppet.py puppet: fix noop parameter error (#6458) 2023-05-03 22:45:01 +02:00
test_redhat_subscription.py redhat_subscription: refactor of internal Rhsm class (#6658) 2023-06-10 15:03:34 +02:00
test_redis_data.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_redis_data_incr.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_redis_data_info.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_redis_info.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_rhn_channel.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_rhn_register.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_rhsm_release.py rhsm_release: improve the execution of subscription-manager (#6669) 2023-06-11 08:34:25 +00:00
test_rhsm_repository.py rhsm_repository: refactor handling of subscription-manager (#6783) 2023-07-02 21:44:53 +02:00
test_rpm_ostree_pkg.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_scaleway_compute_private_network.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_scaleway_private_network.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_slack.py Replace missing default favicon with docs.ansible.com favicon (#5928) 2023-02-03 11:02:14 +01:00
test_snap.py snap: fix bug when processing output (#6826) 2023-07-02 21:27:50 +02:00
test_solaris_zone.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_ss_3par_cpg.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_statsd.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_sysupgrade.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_terraform.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_ufw.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_wdc_redfish_command.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_wdc_redfish_info.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_xcc_redfish_command.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_xenserver_guest_info.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_xenserver_guest_powerstate.py Remove unnecessary test imports (#5978) 2023-02-12 21:05:08 +01:00
test_xfconf.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
test_xfconf_info.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
utils.py Fix more copyright lines, add more default copyright lines (#5095) 2022-08-08 14:24:58 +02:00
xenserver_common.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
xenserver_conftest.py Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00