You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/units
Sam Doran 4bde2d8a97
[stable-2.12] arg_spec - Return aliases in validation result and update aliases (#77576) (#77602)
* [stable-2.12] arg_spec - Return aliases in validation result and update aliases (#77576)

When looking up the `no_log` setting for a parameter that is an alias in
`AnsibleModule._log_invocation()`, the alias value will always be an
empty dictionary since `self.aliases` on the `AnsibleModule` instance is
never updated after initialization. Since the `no_log` setting is on the
canonical parameter not the alias, an incorrect warning is issued if the
parameter matches `PASSWORD_MATCH`.

This PR returns the aliases dictionary as an attribute of the
`ValidationResult` and updates the `aliases` attribute on the
`AnsibleModule` instance.
(cherry picked from commit 1b947eaf92)

Co-authored-by: Sam Doran <github@samdoran.com>

* Rewrite test comprehension for Python 2.6

* No need for list inside the dict constructor
4 years ago
..
_vendor Another unit test fix for Python 3.10. (#74628) 5 years ago
ansible_test Remove Shippable CI provider from ansible-test. 5 years ago
cli ansible-cli: Remove unnessary trailing space (#74880) 5 years ago
compat Move unit test compat code out of `lib/ansible/`. (#46996) 7 years ago
config Provide better decryption errors for single vault values (#72362) 5 years ago
errors Fix YAML error message when error is at the end of the file (#73241) 5 years ago
executor Fix up string splitting to prepare for pylint update. (#75479) 5 years ago
galaxy Get git executable for collections in git repos (#77493) (#77501) 4 years ago
inventory Clean up unit test boilerplate. 6 years ago
inventory_test_data/group_vars Merge branch 'v2_final' into devel_switch_v2 11 years ago
mock Clean up unit tests to prepare for pylint update. (#75473) 5 years ago
module_utils [stable-2.12] arg_spec - Return aliases in validation result and update aliases (#77576) (#77602) 4 years ago
modules unarchive: fix io_buffer_size option, remove ignore.txt entry (#77271) (#77311) 4 years ago
parsing [stable-2.12] Fix warning in unit tests for _yaml import. 4 years ago
playbook play - validate hosts entries (#74147) 5 years ago
plugins winrm - ensure callers PATH for kinit is set (#77401) (#77403) 4 years ago
regex Add toggle to control invalid character substitution in group names (#52748) 7 years ago
template Prevent losing unsafe from lookups (#77609) (#77651) 4 years ago
utils use passlib default if `password_hash` option isn't set (#75043) 4 years ago
vars Remove empty setUp/tearDown/tearDownClass methods in test classes. 6 years ago
__init__.py Add empty-init code-smell script. (#18406) 9 years ago
requirements.txt ansible-test - split controller/target testing (#75605) 4 years ago
test_constants.py Remove some constants.py deprecated items (#70466) 6 years ago
test_context.py Clean up unit test boilerplate. 6 years ago