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
Gaudenz Steinlin c33a782a9c
Fix password lookup rewrites file when using encrypt (#79431)
* Remove unused mock from test_password_already_created_encrypt

The _get_paths mock is never used in the
test_password_already_created_encrypt test case.

* Add test to assert the password file is not rewritten

If the password file already contains the salt and the hasing algorithm
does not use the ident parameter, the password lookup should not write
to the password file.

* Fix "changed" if using "encrypt" in password lookup

When using the "encrypt" parameter to the password lookup without the
ident parameter, the password file was always marked as "changed". This
caused the file to be rewritten with the same content. This is fixed by
only marking the file as changed, if an "ident" value needs to be added
to the file.

Fixes #79430.

Add changelog entry
2 years ago
..
_vendor Use unittest.mock instead of mock. (#77883) 2 years ago
ansible_test Avoid deprecated method in unit tests. 2 years ago
cli tests: Fix `test_ansible_version()` when run within a git checkout (#78636) 2 years ago
compat Remove unit test Python 2.6 compat. (#78369) 2 years ago
config Yolo (#77554) 2 years ago
errors Clean up unit tests. (#78498) 2 years ago
executor Fix connection/become task loop settings (#78565) 2 years ago
galaxy galaxy: Add license_file to manifest directives (#79420) 2 years ago
inventory Fix pytest collection during test_host partial run 2 years ago
inventory_test_data/group_vars Merge branch 'v2_final' into devel_switch_v2 9 years ago
mock Use unittest.mock instead of mock. (#77883) 2 years ago
module_utils Don't assume column index for netmask and broadcast (#79121) 2 years ago
modules Prefer unittest.mock over mock. (#77886) 2 years ago
parsing Remove unit test pytz requirement. (#78368) 2 years ago
playbook Use classproperty to access field attributes of a class (#78180) 2 years ago
plugins Fix password lookup rewrites file when using encrypt (#79431) 2 years ago
regex Add toggle to control invalid character substitution in group names (#52748) 6 years ago
template Use unittest.mock instead of mock. (#77883) 2 years ago
utils Skip test if no there are no problematic chars for wcswidth (#78645) 2 years ago
vars Use unittest.mock instead of mock. (#77883) 2 years ago
__init__.py Add empty-init code-smell script. (#18406) 8 years ago
requirements.txt Update unit test controller requirements. (#78376) 2 years ago
test_constants.py Remove some constants.py deprecated items (#70466) 4 years ago
test_context.py Clean up unit test boilerplate. 4 years ago
test_no_tty.py ansible-test - Fix subprocess management. (#77641) 2 years ago