From bf94f08bc41be101eeaed156a2bf93dfb8db1daf Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Sat, 9 Jul 2022 02:41:57 +0530 Subject: [PATCH] Misc. typo fixes (#4940) Signed-off-by: Abhijeet Kasurde --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- plugins/filter/counter.py | 4 ++-- plugins/filter/jc.py | 2 +- plugins/inventory/cobbler.py | 2 +- plugins/inventory/lxd.py | 2 +- plugins/module_utils/hwc_utils.py | 2 +- plugins/module_utils/opennebula.py | 4 ++-- plugins/module_utils/oracle/oci_utils.py | 4 ++-- plugins/modules/cloud/lxd/lxd_profile.py | 2 +- plugins/modules/cloud/lxd/lxd_project.py | 2 +- plugins/modules/cloud/misc/proxmox_kvm.py | 4 ++-- plugins/modules/cloud/xenserver/xenserver_guest.py | 8 ++++---- plugins/modules/files/ini_file.py | 2 +- plugins/modules/files/sapcar_extract.py | 2 +- plugins/modules/identity/ipa/ipa_otpconfig.py | 4 ++-- plugins/modules/identity/ipa/ipa_vault.py | 2 +- .../modules/identity/keycloak/keycloak_realm_info.py | 2 +- plugins/modules/net_tools/nmcli.py | 2 +- .../packaging/language/ansible_galaxy_install.py | 2 +- plugins/modules/packaging/language/composer.py | 2 +- .../remote_management/redfish/ilo_redfish_info.py | 2 +- .../source_control/gitlab/gitlab_protected_branch.py | 2 +- plugins/modules/source_control/gitlab/gitlab_user.py | 2 +- plugins/modules/storage/pmem/pmem.py | 2 +- plugins/modules/system/homectl.py | 2 +- plugins/modules/system/timezone.py | 2 +- .../integration/targets/filter_from_csv/tasks/main.yml | 2 +- tests/integration/targets/iso_create/tasks/main.yml | 4 ++-- tests/integration/targets/timezone/tasks/main.yml | 2 +- tests/unit/plugins/inventory/test_stackpath_compute.py | 4 ++-- tests/unit/plugins/module_utils/xenserver/conftest.py | 2 +- tests/unit/plugins/modules/cloud/xenserver/conftest.py | 2 +- .../modules/net_tools/pritunl/test_pritunl_org.py | 4 ++-- tests/unit/plugins/modules/net_tools/test_nmcli.py | 10 +++++----- tests/unit/plugins/modules/notification/test_slack.py | 2 +- .../plugins/modules/packaging/language/test_cpanm.py | 2 +- .../plugins/modules/system/interfaces_file/README.md | 2 +- .../plugins/modules/system/test_gconftool2_info.py | 2 +- tests/unit/plugins/modules/system/test_xfconf.py | 2 +- tests/unit/plugins/modules/system/test_xfconf_info.py | 2 +- 40 files changed, 55 insertions(+), 55 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index d640b9aae4..b0ee1b03bf 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -105,7 +105,7 @@ body: attributes: label: Steps to Reproduce description: | - Describe exactly how to reproduce the problem, using a minimal test-case. It would *really* help us understand your problem if you could also pased any playbooks, configs and commands you used. + Describe exactly how to reproduce the problem, using a minimal test-case. It would *really* help us understand your problem if you could also passed any playbooks, configs and commands you used. **HINT:** You can paste https://gist.github.com links for larger files. value: | diff --git a/plugins/filter/counter.py b/plugins/filter/counter.py index 5d7f365f94..717238d24e 100644 --- a/plugins/filter/counter.py +++ b/plugins/filter/counter.py @@ -21,7 +21,7 @@ DOCUMENTATION = ''' ''' EXAMPLES = ''' -- name: Count occurences +- name: Count occurrences ansible.builtin.debug: msg: >- {{ [1, 'a', 2, 2, 'a', 'b', 'a'] | community.general.counter }} @@ -30,7 +30,7 @@ EXAMPLES = ''' RETURN = ''' _value: - description: A dictionary with the elements of the sequence as keys, and their number of occurance in the sequence as values. + description: A dictionary with the elements of the sequence as keys, and their number of occurrences in the sequence as values. type: dictionary ''' diff --git a/plugins/filter/jc.py b/plugins/filter/jc.py index 094da26632..19634340b9 100644 --- a/plugins/filter/jc.py +++ b/plugins/filter/jc.py @@ -38,7 +38,7 @@ DOCUMENTATION = ''' parser: description: - The correct parser for the input data. - - For exmaple C(ifconfig). + - For example C(ifconfig). - See U(https://github.com/kellyjonbrazil/jc#parsers) for the latest list of parsers. type: string required: true diff --git a/plugins/inventory/cobbler.py b/plugins/inventory/cobbler.py index d50acd0c55..56b52ee1e2 100644 --- a/plugins/inventory/cobbler.py +++ b/plugins/inventory/cobbler.py @@ -213,7 +213,7 @@ class InventoryModule(BaseInventoryPlugin, Cacheable): self.inventory.add_child(parent_group_name, group_name) else: self.display.vvvv('Processing profile %s without parent\n' % profile['name']) - # Create a heirarchy of profile names + # Create a hierarchy of profile names profile_elements = profile['name'].split('-') i = 0 while i < len(profile_elements) - 1: diff --git a/plugins/inventory/lxd.py b/plugins/inventory/lxd.py index 912638509d..788c8852bf 100644 --- a/plugins/inventory/lxd.py +++ b/plugins/inventory/lxd.py @@ -522,7 +522,7 @@ class InventoryModule(BaseInventoryPlugin): """Helper to save data Helper to save the data in self.data - Detect if data is allready in branch and use dict_merge() to prevent that branch is overwritten. + Detect if data is already in branch and use dict_merge() to prevent that branch is overwritten. Args: str(instance_name): name of instance diff --git a/plugins/module_utils/hwc_utils.py b/plugins/module_utils/hwc_utils.py index 4507df020d..7977554b9b 100644 --- a/plugins/module_utils/hwc_utils.py +++ b/plugins/module_utils/hwc_utils.py @@ -351,7 +351,7 @@ def wait_to_finish(target, pending, refresh, timeout, min_interval=1, delay=3): if pending and status not in pending: raise HwcModuleException( - "unexpect status(%s) occured" % status) + "unexpect status(%s) occurred" % status) if not is_last_time: wait *= 2 diff --git a/plugins/module_utils/opennebula.py b/plugins/module_utils/opennebula.py index 6b67a6cf85..b0adb8d69b 100644 --- a/plugins/module_utils/opennebula.py +++ b/plugins/module_utils/opennebula.py @@ -83,12 +83,12 @@ class OpenNebulaModule: if self.module.params.get("api_username"): username = self.module.params.get("api_username") else: - self.fail("Either api_username or the environment vairable ONE_USERNAME must be provided") + self.fail("Either api_username or the environment variable ONE_USERNAME must be provided") if self.module.params.get("api_password"): password = self.module.params.get("api_password") else: - self.fail("Either api_password or the environment vairable ONE_PASSWORD must be provided") + self.fail("Either api_password or the environment variable ONE_PASSWORD must be provided") session = "%s:%s" % (username, password) diff --git a/plugins/module_utils/oracle/oci_utils.py b/plugins/module_utils/oracle/oci_utils.py index 88e577af5c..0c7e0ec143 100644 --- a/plugins/module_utils/oracle/oci_utils.py +++ b/plugins/module_utils/oracle/oci_utils.py @@ -691,7 +691,7 @@ def check_and_create_resource( :param model: Model used to create a resource. :param exclude_attributes: The attributes which should not be used to distinguish the resource. e.g. display_name, dns_label. - :param dead_states: List of states which can't transition to any of the usable states of the resource. This deafults + :param dead_states: List of states which can't transition to any of the usable states of the resource. This defaults to ["TERMINATING", "TERMINATED", "FAULTY", "FAILED", "DELETING", "DELETED", "UNKNOWN_ENUM_VALUE"] :param default_attribute_values: A dictionary containing default values for attributes. :return: A dictionary containing the resource & the "changed" status. e.g. {"vcn":{x:y}, "changed":True} @@ -1189,7 +1189,7 @@ def are_dicts_equal( def should_dict_attr_be_excluded(map_option_name, option_key, exclude_list): - """An entry for the Exclude list for excluding a map's key is specifed as a dict with the map option name as the + """An entry for the Exclude list for excluding a map's key is specified as a dict with the map option name as the key, and the value as a list of keys to be excluded within that map. For example, if the keys "k1" and "k2" of a map option named "m1" needs to be excluded, the exclude list must have an entry {'m1': ['k1','k2']} """ for exclude_item in exclude_list: diff --git a/plugins/modules/cloud/lxd/lxd_profile.py b/plugins/modules/cloud/lxd/lxd_profile.py index 82244f0bac..f86f333a37 100644 --- a/plugins/modules/cloud/lxd/lxd_profile.py +++ b/plugins/modules/cloud/lxd/lxd_profile.py @@ -360,7 +360,7 @@ class LXDProfileManagement(object): ) def _merge_dicts(self, source, destination): - """Merge Dictionarys + """Merge Dictionaries Get a list of filehandle numbers from logger to be handed to DaemonContext.files_preserve diff --git a/plugins/modules/cloud/lxd/lxd_project.py b/plugins/modules/cloud/lxd/lxd_project.py index d1488272c8..2a4a319753 100644 --- a/plugins/modules/cloud/lxd/lxd_project.py +++ b/plugins/modules/cloud/lxd/lxd_project.py @@ -303,7 +303,7 @@ class LXDProjectManagement(object): ) def _merge_dicts(self, source, destination): - """ Return a new dict taht merge two dict, + """ Return a new dict that merge two dict, with values in source dict overwrite destination dict Args: diff --git a/plugins/modules/cloud/misc/proxmox_kvm.py b/plugins/modules/cloud/misc/proxmox_kvm.py index c6e47f36e4..abc63f24c3 100644 --- a/plugins/modules/cloud/misc/proxmox_kvm.py +++ b/plugins/modules/cloud/misc/proxmox_kvm.py @@ -1204,12 +1204,12 @@ def main(): # Ensure source VM id exists when cloning proxmox.get_vm(vmid) - # Ensure the choosen VM name doesn't already exist when cloning + # Ensure the chosen VM name doesn't already exist when cloning existing_vmid = proxmox.get_vmid(name, ignore_missing=True) if existing_vmid: module.exit_json(changed=False, vmid=existing_vmid, msg="VM with name <%s> already exists" % name) - # Ensure the choosen VM id doesn't already exist when cloning + # Ensure the chosen VM id doesn't already exist when cloning if proxmox.get_vm(newid, ignore_missing=True): module.exit_json(changed=False, vmid=vmid, msg="vmid %s with VM name %s already exists" % (newid, name)) diff --git a/plugins/modules/cloud/xenserver/xenserver_guest.py b/plugins/modules/cloud/xenserver/xenserver_guest.py index b90b380c3f..bd8bb7d7e1 100644 --- a/plugins/modules/cloud/xenserver/xenserver_guest.py +++ b/plugins/modules/cloud/xenserver/xenserver_guest.py @@ -1207,7 +1207,7 @@ class XenServerVM(XenServerObject): if (self.module.params['home_server'] and (not self.vm_params['affinity'] or self.module.params['home_server'] != self.vm_params['affinity']['name_label'])): - # Check existance only. Ignore return value. + # Check existence only. Ignore return value. get_object_ref(self.module, self.module.params['home_server'], uuid=None, obj_type="home server", fail=True, msg_prefix="VM check home_server: ") @@ -1371,7 +1371,7 @@ class XenServerVM(XenServerObject): disk_sr = disk_params.get('sr') if disk_sr_uuid is not None or disk_sr is not None: - # Check existance only. Ignore return value. + # Check existence only. Ignore return value. get_object_ref(self.module, disk_sr, disk_sr_uuid, obj_type="SR", fail=True, msg_prefix="VM check disks[%s]: " % position) elif self.default_sr_ref == 'OpaqueRef:NULL': @@ -1448,7 +1448,7 @@ class XenServerVM(XenServerObject): if cdrom_type == "iso": # Check if ISO exists. - # Check existance only. Ignore return value. + # Check existence only. Ignore return value. get_object_ref(self.module, cdrom_iso_name, uuid=None, obj_type="ISO image", fail=True, msg_prefix="VM check cdrom.iso_name: ") @@ -1496,7 +1496,7 @@ class XenServerVM(XenServerObject): self.module.fail_json(msg="VM check networks[%s]: network name cannot be an empty string!" % position) if network_name: - # Check existance only. Ignore return value. + # Check existence only. Ignore return value. get_object_ref(self.module, network_name, uuid=None, obj_type="network", fail=True, msg_prefix="VM check networks[%s]: " % position) diff --git a/plugins/modules/files/ini_file.py b/plugins/modules/files/ini_file.py index 79d373f3a7..c18fd24eff 100644 --- a/plugins/modules/files/ini_file.py +++ b/plugins/modules/files/ini_file.py @@ -279,7 +279,7 @@ def do_ini(module, filename, section=None, option=None, values=None, # handling multiple instances of option=value when state is 'present' with/without exclusive is a bit complex # # 1. edit all lines where we have a option=value pair with a matching value in values[] - # 2. edit all the remaing lines where we have a matching option + # 2. edit all the remaining lines where we have a matching option # 3. delete remaining lines where we have a matching option # 4. insert missing option line(s) at the end of the section diff --git a/plugins/modules/files/sapcar_extract.py b/plugins/modules/files/sapcar_extract.py index 8463703c1e..da29580059 100644 --- a/plugins/modules/files/sapcar_extract.py +++ b/plugins/modules/files/sapcar_extract.py @@ -207,7 +207,7 @@ def main(): changed = True else: changed = False - out = "allready unpacked" + out = "already unpacked" if remove: os.remove(path) diff --git a/plugins/modules/identity/ipa/ipa_otpconfig.py b/plugins/modules/identity/ipa/ipa_otpconfig.py index 9a10baec0b..080a2750c7 100644 --- a/plugins/modules/identity/ipa/ipa_otpconfig.py +++ b/plugins/modules/identity/ipa/ipa_otpconfig.py @@ -45,7 +45,7 @@ EXAMPLES = r''' ipa_user: admin ipa_pass: supersecret -- name: Ensure the TOTP syncronization window is set to 86400 seconds +- name: Ensure the TOTP synchronization window is set to 86400 seconds community.general.ipa_otpconfig: ipatokentotpsyncwindow: '86400' ipa_host: localhost @@ -59,7 +59,7 @@ EXAMPLES = r''' ipa_user: admin ipa_pass: supersecret -- name: Ensure the HOTP syncronization window is set to 100 hops +- name: Ensure the HOTP synchronization window is set to 100 hops community.general.ipa_otpconfig: ipatokenhotpsyncwindow: '100' ipa_host: localhost diff --git a/plugins/modules/identity/ipa/ipa_vault.py b/plugins/modules/identity/ipa/ipa_vault.py index 7a6a601fa9..108843b224 100644 --- a/plugins/modules/identity/ipa/ipa_vault.py +++ b/plugins/modules/identity/ipa/ipa_vault.py @@ -63,7 +63,7 @@ options: type: str replace: description: - - Force replace the existant vault on IPA server. + - Force replace the existent vault on IPA server. type: bool default: False choices: ["True", "False"] diff --git a/plugins/modules/identity/keycloak/keycloak_realm_info.py b/plugins/modules/identity/keycloak/keycloak_realm_info.py index a84c9dc767..b67f1333e1 100644 --- a/plugins/modules/identity/keycloak/keycloak_realm_info.py +++ b/plugins/modules/identity/keycloak/keycloak_realm_info.py @@ -64,7 +64,7 @@ msg: realm_info: description: - - Representation of the realm public infomation. + - Representation of the realm public information. returned: always type: dict contains: diff --git a/plugins/modules/net_tools/nmcli.py b/plugins/modules/net_tools/nmcli.py index bb4a5016ff..caf4b3ba7f 100644 --- a/plugins/modules/net_tools/nmcli.py +++ b/plugins/modules/net_tools/nmcli.py @@ -1501,7 +1501,7 @@ class Nmcli(object): if self._hairpin is None: self.module.deprecate( "Parameter 'hairpin' default value will change from true to false in community.general 7.0.0. " - "Set the value explicitly to supress this warning.", + "Set the value explicitly to suppress this warning.", version='7.0.0', collection_name='community.general', ) # Should be False in 7.0.0 but then that should be in argument_specs diff --git a/plugins/modules/packaging/language/ansible_galaxy_install.py b/plugins/modules/packaging/language/ansible_galaxy_install.py index 7b7ac160da..5e2a810f0a 100644 --- a/plugins/modules/packaging/language/ansible_galaxy_install.py +++ b/plugins/modules/packaging/language/ansible_galaxy_install.py @@ -242,7 +242,7 @@ class AnsibleGalaxyInstall(CmdModuleHelper): self.module.deprecate( "Support for Ansible 2.9 and ansible-base 2.10 is being deprecated. " "At the same time support for them is ended, also the ack_ansible29 option will be removed. " - "Upgrading is strongly recommended, or set 'ack_min_ansiblecore211' to supress this message.", + "Upgrading is strongly recommended, or set 'ack_min_ansiblecore211' to suppress this message.", version="8.0.0", collection_name="community.general", ) diff --git a/plugins/modules/packaging/language/composer.py b/plugins/modules/packaging/language/composer.py index 351a104658..f0ae135c39 100644 --- a/plugins/modules/packaging/language/composer.py +++ b/plugins/modules/packaging/language/composer.py @@ -81,7 +81,7 @@ options: classmap_authoritative: description: - Autoload classes from classmap only. - - Implicitely enable optimize_autoloader. + - Implicitly enable optimize_autoloader. - Recommended especially for production, but can take a bit of time to run. default: false type: bool diff --git a/plugins/modules/remote_management/redfish/ilo_redfish_info.py b/plugins/modules/remote_management/redfish/ilo_redfish_info.py index f935144474..99a6041df3 100644 --- a/plugins/modules/remote_management/redfish/ilo_redfish_info.py +++ b/plugins/modules/remote_management/redfish/ilo_redfish_info.py @@ -74,7 +74,7 @@ ilo_redfish_info: type: dict contains: ret: - description: Check variable to see if the information was succesfully retrived. + description: Check variable to see if the information was successfully retrieved. type: bool msg: description: Information of all active iLO sessions. diff --git a/plugins/modules/source_control/gitlab/gitlab_protected_branch.py b/plugins/modules/source_control/gitlab/gitlab_protected_branch.py index fe8e98a3f3..a5fd65b5bd 100644 --- a/plugins/modules/source_control/gitlab/gitlab_protected_branch.py +++ b/plugins/modules/source_control/gitlab/gitlab_protected_branch.py @@ -36,7 +36,7 @@ options: name: description: - The name of the branch that needs to be protected. - - Can make use a wildcard charachter for like C(production/*) or just have C(main) or C(develop) as value. + - Can make use a wildcard character for like C(production/*) or just have C(main) or C(develop) as value. required: true type: str merge_access_levels: diff --git a/plugins/modules/source_control/gitlab/gitlab_user.py b/plugins/modules/source_control/gitlab/gitlab_user.py index 803c54bc83..4a215d6d0b 100644 --- a/plugins/modules/source_control/gitlab/gitlab_user.py +++ b/plugins/modules/source_control/gitlab/gitlab_user.py @@ -305,7 +305,7 @@ class GitLabUser(object): # note: as we unfortunately have some uncheckable parameters # where it is not possible to determine if the update # changed something or not, we must assume here that a - # changed happend and that an user object update is needed + # changed happened and that an user object update is needed potentionally_changed = True # Assign ssh keys diff --git a/plugins/modules/storage/pmem/pmem.py b/plugins/modules/storage/pmem/pmem.py index b91bab5fad..55bf1ca46d 100644 --- a/plugins/modules/storage/pmem/pmem.py +++ b/plugins/modules/storage/pmem/pmem.py @@ -99,7 +99,7 @@ options: - The size of namespace. This option supports the suffixes C(k) or C(K) or C(KB) for KiB, C(m) or C(M) or C(MB) for MiB, C(g) or C(G) or C(GB) for GiB and C(t) or C(T) or C(TB) for TiB. - This option is required if multiple namespaces are configured. - - If this option is not set, all of the avaiable space of a region is configured. + - If this option is not set, all of the available space of a region is configured. type: str required: false namespace_append: diff --git a/plugins/modules/system/homectl.py b/plugins/modules/system/homectl.py index ff7a619509..c71b49adeb 100644 --- a/plugins/modules/system/homectl.py +++ b/plugins/modules/system/homectl.py @@ -57,7 +57,7 @@ options: realname: description: - The user's real ('human') name. - - This can also be used to add a comment to maintain compatability with C(useradd). + - This can also be used to add a comment to maintain compatibility with C(useradd). aliases: [ 'comment' ] type: str realm: diff --git a/plugins/modules/system/timezone.py b/plugins/modules/system/timezone.py index f632939041..6017f98293 100644 --- a/plugins/modules/system/timezone.py +++ b/plugins/modules/system/timezone.py @@ -790,7 +790,7 @@ class AIXTimezone(Timezone): inspects C(/etc/environment) to determine the current timezone. While AIX time zones can be set using two formats (POSIX and - Olson) the prefered method is Olson. + Olson) the preferred method is Olson. See the following article for more information: https://developer.ibm.com/articles/au-aix-posix/ diff --git a/tests/integration/targets/filter_from_csv/tasks/main.yml b/tests/integration/targets/filter_from_csv/tasks/main.yml index aafb28fbb0..5a67494a00 100644 --- a/tests/integration/targets/filter_from_csv/tasks/main.yml +++ b/tests/integration/targets/filter_from_csv/tasks/main.yml @@ -14,7 +14,7 @@ - "valid_comma_separated_spaces | community.general.from_csv(skipinitialspace=True) == expected_result" - "valid_comma_separated_spaces | community.general.from_csv != expected_result" -- name: Parse valid csv input with no headers with/without specifiying fieldnames +- name: Parse valid csv input with no headers with/without specifying fieldnames assert: that: - "valid_comma_separated_no_headers | community.general.from_csv(fieldnames=['id','name','role']) == expected_result" diff --git a/tests/integration/targets/iso_create/tasks/main.yml b/tests/integration/targets/iso_create/tasks/main.yml index f55b94543c..adf0d35450 100644 --- a/tests/integration/targets/iso_create/tasks/main.yml +++ b/tests/integration/targets/iso_create/tasks/main.yml @@ -105,7 +105,7 @@ - iso_result is changed - iso_file.stat.exists == True -- name: Create iso file with Rock Ridge extention +- name: Create iso file with Rock Ridge extension iso_create: src_files: - "{{ remote_tmp_dir }}/test1.cfg" @@ -124,7 +124,7 @@ - iso_result is changed - iso_file.stat.exists == True -- name: Create iso file with Joliet extention +- name: Create iso file with Joliet extension iso_create: src_files: - "{{ remote_tmp_dir }}/test1.cfg" diff --git a/tests/integration/targets/timezone/tasks/main.yml b/tests/integration/targets/timezone/tasks/main.yml index 305a458639..3a25d74eac 100644 --- a/tests/integration/targets/timezone/tasks/main.yml +++ b/tests/integration/targets/timezone/tasks/main.yml @@ -66,7 +66,7 @@ - name: Run tests - # Skip tests on Fedora 31 and 32 because dbus fails to start unless the container is run in priveleged mode. + # Skip tests on Fedora 31 and 32 because dbus fails to start unless the container is run in privileged mode. # Even then, it starts unreliably. This may be due to the move to cgroup v2 in Fedora 31 and 32. # https://www.redhat.com/sysadmin/fedora-31-control-group-v2 when: diff --git a/tests/unit/plugins/inventory/test_stackpath_compute.py b/tests/unit/plugins/inventory/test_stackpath_compute.py index 8a409becd6..73d9a06a33 100644 --- a/tests/unit/plugins/inventory/test_stackpath_compute.py +++ b/tests/unit/plugins/inventory/test_stackpath_compute.py @@ -107,7 +107,7 @@ def test_validate_config(inventory): } with pytest.raises(AnsibleError) as error_message: inventory._validate_config(config) - assert "config missing client_secret, a required paramter" in error_message + assert "config missing client_secret, a required parameter" in error_message config = { "client_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", @@ -116,7 +116,7 @@ def test_validate_config(inventory): } with pytest.raises(AnsibleError) as error_message: inventory._validate_config(config) - assert "config missing client_id, a required paramter" in error_message + assert "config missing client_id, a required parameter" in error_message def test_populate(inventory): diff --git a/tests/unit/plugins/module_utils/xenserver/conftest.py b/tests/unit/plugins/module_utils/xenserver/conftest.py index 52f654bcc6..d36166fcc0 100644 --- a/tests/unit/plugins/module_utils/xenserver/conftest.py +++ b/tests/unit/plugins/module_utils/xenserver/conftest.py @@ -39,7 +39,7 @@ def XenAPI(): """Imports and returns fake XenAPI module.""" # Import of fake XenAPI module is wrapped by fixture so that it does not - # affect other unit tests which could potentialy also use XenAPI module. + # affect other unit tests which could potentially also use XenAPI module. # First we use importlib.import_module() to import the module and assign # it to a local symbol. diff --git a/tests/unit/plugins/modules/cloud/xenserver/conftest.py b/tests/unit/plugins/modules/cloud/xenserver/conftest.py index d2bfcd0e8d..479f4479a3 100644 --- a/tests/unit/plugins/modules/cloud/xenserver/conftest.py +++ b/tests/unit/plugins/modules/cloud/xenserver/conftest.py @@ -35,7 +35,7 @@ def XenAPI(): """Imports and returns fake XenAPI module.""" # Import of fake XenAPI module is wrapped by fixture so that it does not - # affect other unit tests which could potentialy also use XenAPI module. + # affect other unit tests which could potentially also use XenAPI module. # First we use importlib.import_module() to import the module and assign # it to a local symbol. diff --git a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org.py b/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org.py index 39071974c8..74959efe0b 100644 --- a/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org.py +++ b/tests/unit/plugins/modules/net_tools/pritunl/test_pritunl_org.py @@ -109,7 +109,7 @@ class TestPritunlOrg(ModuleTestCase): idempotent_exc = idempotent_result.exception.args[0] # Ensure both calls resulted in the same returned value - # except for changed which sould be false the second time + # except for changed which should be false the second time for k, v in iteritems(idempotent_exc): if k == "changed": self.assertFalse(idempotent_exc[k]) @@ -158,7 +158,7 @@ class TestPritunlOrg(ModuleTestCase): idempotent_exc = idempotent_result.exception.args[0] # Ensure both calls resulted in the same returned value - # except for changed which sould be false the second time + # except for changed which should be false the second time self.assertFalse(idempotent_exc["changed"]) self.assertEqual(idempotent_exc["response"], delete_exc["response"]) diff --git a/tests/unit/plugins/modules/net_tools/test_nmcli.py b/tests/unit/plugins/modules/net_tools/test_nmcli.py index 487465d863..c87691b254 100644 --- a/tests/unit/plugins/modules/net_tools/test_nmcli.py +++ b/tests/unit/plugins/modules/net_tools/test_nmcli.py @@ -3309,7 +3309,7 @@ def test_gsm_connection_unchanged(mocked_gsm_connection_unchanged, capfd): @pytest.mark.parametrize('patch_ansible_module', TESTCASE_ETHERNET_STATIC_MULTIPLE_IP4_ADDRESSES, indirect=['patch_ansible_module']) -def test_create_ethernet_with_mulitple_ip4_addresses_static(mocked_generic_connection_create, capfd): +def test_create_ethernet_with_multiple_ip4_addresses_static(mocked_generic_connection_create, capfd): """ Test : Create ethernet connection with static IP configuration """ @@ -3349,7 +3349,7 @@ def test_create_ethernet_with_mulitple_ip4_addresses_static(mocked_generic_conne @pytest.mark.parametrize('patch_ansible_module', TESTCASE_ETHERNET_STATIC_MULTIPLE_IP6_ADDRESSES, indirect=['patch_ansible_module']) -def test_create_ethernet_with_mulitple_ip6_addresses_static(mocked_generic_connection_create, capfd): +def test_create_ethernet_with_multiple_ip6_addresses_static(mocked_generic_connection_create, capfd): """ Test : Create ethernet connection with multiple IPv6 addresses configuration """ @@ -3389,7 +3389,7 @@ def test_create_ethernet_with_mulitple_ip6_addresses_static(mocked_generic_conne @pytest.mark.parametrize('patch_ansible_module', TESTCASE_ETHERNET_STATIC_MULTIPLE_IP4_ADDRESSES, indirect=['patch_ansible_module']) -def test_ethernet_connection_static_with_mulitple_ip4_addresses_unchanged(mocked_ethernet_connection_static_multiple_ip4_addresses_unchanged, capfd): +def test_ethernet_connection_static_with_multiple_ip4_addresses_unchanged(mocked_ethernet_connection_static_multiple_ip4_addresses_unchanged, capfd): """ Test : Ethernet connection with static IP configuration unchanged """ @@ -3403,7 +3403,7 @@ def test_ethernet_connection_static_with_mulitple_ip4_addresses_unchanged(mocked @pytest.mark.parametrize('patch_ansible_module', TESTCASE_ETHERNET_STATIC_MULTIPLE_IP6_ADDRESSES, indirect=['patch_ansible_module']) -def test_ethernet_connection_static_with_mulitple_ip6_addresses_unchanged(mocked_ethernet_connection_static_multiple_ip6_addresses_unchanged, capfd): +def test_ethernet_connection_static_with_multiple_ip6_addresses_unchanged(mocked_ethernet_connection_static_multiple_ip6_addresses_unchanged, capfd): """ Test : Ethernet connection with multiple IPv6 addresses configuration unchanged """ @@ -3485,7 +3485,7 @@ def test_create_ethernet_addr_gen_mode_and_ip6_privacy_static(mocked_generic_con @pytest.mark.parametrize('patch_ansible_module', TESTCASE_ETHERNET_STATIC_IP6_PRIVACY_AND_ADDR_GEN_MODE, indirect=['patch_ansible_module']) -def test_ethernet_connection_static_with_mulitple_ip4_addresses_unchanged(mocked_ethernet_connection_static_ip6_privacy_and_addr_gen_mode_unchange, capfd): +def test_ethernet_connection_static_with_multiple_ip4_addresses_unchanged(mocked_ethernet_connection_static_ip6_privacy_and_addr_gen_mode_unchange, capfd): """ Test : Ethernet connection with static IP configuration unchanged """ diff --git a/tests/unit/plugins/modules/notification/test_slack.py b/tests/unit/plugins/modules/notification/test_slack.py index 85f9b100f0..96082e0926 100644 --- a/tests/unit/plugins/modules/notification/test_slack.py +++ b/tests/unit/plugins/modules/notification/test_slack.py @@ -37,7 +37,7 @@ class TestSlackModule(ModuleTestCase): with self.assertRaises(AnsibleFailJson): self.module.main() - def test_sucessful_message(self): + def test_successful_message(self): """tests sending a message. This is example 1 from the docs""" set_module_args({ 'token': 'XXXX/YYYY/ZZZZ', diff --git a/tests/unit/plugins/modules/packaging/language/test_cpanm.py b/tests/unit/plugins/modules/packaging/language/test_cpanm.py index 10a2955019..b89a07018f 100644 --- a/tests/unit/plugins/modules/packaging/language/test_cpanm.py +++ b/tests/unit/plugins/modules/packaging/language/test_cpanm.py @@ -19,7 +19,7 @@ TESTED_MODULE = cpanm.__name__ @pytest.fixture def patch_cpanm(mocker): """ - Function used for mocking some parts of redhat_subscribtion module + Function used for mocking some parts of redhat_subscription module """ mocker.patch('ansible_collections.community.general.plugins.module_utils.module_helper.AnsibleModule.get_bin_path', return_value='/testbin/cpanm') diff --git a/tests/unit/plugins/modules/system/interfaces_file/README.md b/tests/unit/plugins/modules/system/interfaces_file/README.md index a10c659db0..c78c3e3264 100644 --- a/tests/unit/plugins/modules/system/interfaces_file/README.md +++ b/tests/unit/plugins/modules/system/interfaces_file/README.md @@ -3,7 +3,7 @@ ## Tests structure - `input` directory contains interfaces configuration files -- `test_interfaces_file.py` runs each hardcoded test agains all configurations in `input` directory and compares results with golden outputs in `golden_output` +- `test_interfaces_file.py` runs each hardcoded test against all configurations in `input` directory and compares results with golden outputs in `golden_output` ## Running unit tests with docker diff --git a/tests/unit/plugins/modules/system/test_gconftool2_info.py b/tests/unit/plugins/modules/system/test_gconftool2_info.py index 97d349f428..29ccf5f090 100644 --- a/tests/unit/plugins/modules/system/test_gconftool2_info.py +++ b/tests/unit/plugins/modules/system/test_gconftool2_info.py @@ -17,7 +17,7 @@ TESTED_MODULE = gconftool2_info.__name__ @pytest.fixture def patch_gconftool2_info(mocker): """ - Function used for mocking some parts of redhat_subscribtion module + Function used for mocking some parts of redhat_subscription module """ mocker.patch('ansible_collections.community.general.plugins.module_utils.mh.module_helper.AnsibleModule.get_bin_path', return_value='/testbin/gconftool-2') diff --git a/tests/unit/plugins/modules/system/test_xfconf.py b/tests/unit/plugins/modules/system/test_xfconf.py index e8de07ae0b..5744100c5e 100644 --- a/tests/unit/plugins/modules/system/test_xfconf.py +++ b/tests/unit/plugins/modules/system/test_xfconf.py @@ -19,7 +19,7 @@ TESTED_MODULE = xfconf.__name__ @pytest.fixture def patch_xfconf(mocker): """ - Function used for mocking some parts of redhat_subscribtion module + Function used for mocking some parts of redhat_subscription module """ mocker.patch('ansible_collections.community.general.plugins.module_utils.mh.module_helper.AnsibleModule.get_bin_path', return_value='/testbin/xfconf-query') diff --git a/tests/unit/plugins/modules/system/test_xfconf_info.py b/tests/unit/plugins/modules/system/test_xfconf_info.py index 528622d0ee..5eb68003fe 100644 --- a/tests/unit/plugins/modules/system/test_xfconf_info.py +++ b/tests/unit/plugins/modules/system/test_xfconf_info.py @@ -16,7 +16,7 @@ TESTED_MODULE = xfconf_info.__name__ @pytest.fixture def patch_xfconf_info(mocker): """ - Function used for mocking some parts of redhat_subscribtion module + Function used for mocking some parts of redhat_subscription module """ mocker.patch('ansible_collections.community.general.plugins.module_utils.mh.module_helper.AnsibleModule.get_bin_path', return_value='/testbin/xfconf-query')