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/module_utils
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
..
basic [stable-2.12] arg_spec - Return aliases in validation result and update aliases (#77576) (#77602) 4 years ago
common [stable-2.12] arg_spec - Return aliases in validation result and update aliases (#77576) (#77602) 4 years ago
facts [stable-2.12] check /.dockerenv and /.dockerinit to guess a dockercontainer (#74349) (#76218) 4 years ago
json_utils Clean up unit test boilerplate. 6 years ago
parsing Clean up unit test boilerplate. 6 years ago
urls Clean up unit tests to prepare for pylint update. (#75473) 4 years ago
__init__.py Add empty-init code-smell script. (#18406) 9 years ago
conftest.py Clean up unit test boilerplate. 6 years ago
test_api.py ansible-galaxy - increase page size and add retry decorator for throttling (#74240) 5 years ago
test_connection.py [stable-2.12] Don't show params when there is an issue with `set_option(s)` (#75805) (#75807) 4 years ago
test_distro.py Update vendored copy of distro to 1.6.0 (#75732) 4 years ago