ansible/test/units/module_utils/basic
kaorihinata 3ca4580cb4 Allow no_log=False to silence the no_log warnings for module parameters (#64733)
As AnsibleModule._log_invocation is currently implemented, any parameter
with a name that matches PASSWORD_MATCH triggers the no_log warning as a
precaution against parameters that may contain sensitive data, but have not
been marked as sensitive by the module author.

This patch would allow module authors to explicitly mark the aforementioned
parameters as not sensitive thereby bypassing an erroneous warning message,
while still catching parameters which have not been marked at all by the
author.

Adds tests for various no_log states including True, False, and None (as
extracted by AnsibleModule._log_invocation) when applied to an argument with
a name that matches PASSWORD_MATCH.

Fixes: #49465 #64656
2020-01-09 16:47:57 -05:00
..
__init__.py
test__log_invocation.py
test__symbolic_mode_to_octal.py
test_argument_spec.py Allow no_log=False to silence the no_log warnings for module parameters (#64733) 2020-01-09 16:47:57 -05:00
test_atomic_move.py Update units to pass on macOS (#60435) 2019-08-12 15:13:07 -05:00
test_deprecate_warn.py
test_dict_converters.py
test_exit_json.py
test_filesystem.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_get_file_attributes.py
test_get_module_path.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_heuristic_log_sanitize.py Replace TestCase.assertEquals with TestCase.assertEqual. 2019-11-11 10:24:21 -08:00
test_imports.py unit tests: remove unused imports (#59636) 2019-07-26 10:53:31 -04:00
test_log.py Fix unit test parametrize order on Python 3.5. 2018-09-17 22:45:42 -07:00
test_no_log.py Replace TestCase.assertEquals with TestCase.assertEqual. 2019-11-11 10:24:21 -08:00
test_platform_distribution.py unit tests: remove unused imports (#59636) 2019-07-26 10:53:31 -04:00
test_run_command.py ensure bytes in run_command (#58411) 2019-07-02 17:07:48 -05:00
test_safe_eval.py
test_selinux.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_set_mode_if_different.py unit tests: remove unused imports (#60462) 2019-08-13 19:21:43 +02:00
test_tmpdir.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00