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
snipfoo 0a0dbcf21f
[stable-2.16] Fix condition for unquoting configuration strings from ini files (#82388)
* Add prefix to `origin` when configuration variables come from ini files

Fixes ansible#82387

This change was suggested by @bcoca in
https://github.com/ansible/ansible/pull/82388#discussion_r1424235728 and
https://github.com/ansible/ansible/pull/82388#discussion_r1424249732

When configuration variables come from an ini file, their `origin` is
now set to `ini: <file>`. Similarly, once supported, YAML configuration
files will have their `origin` as `yaml: <file>`.

Consequently, since unquoting configuration strings should happen if and
only if they come from an ini file, this condition boils down to testing
whether their `origin` starts with `ini:`.

* Do not add prefix to `origin` but explicitly pass `origin_ftype`

So as not to rely on a specific format of the `origin` string,
as suggested by @sivel in
https://github.com/ansible/ansible/pull/82388#issuecomment-1881714871
(cherry picked from commit 5f4e332e37)

Co-authored-by: snipfoo <79416808+snipfoo@users.noreply.github.com>
4 weeks ago
..
_vendor Improve unit test code coverage (#80683) 2 years ago
ansible_test Improve code coverage of unit tests (#80904) 2 years ago
cli ansible-galaxy - fix traceback error for invalid req file (#81917) (#81924) 1 year ago
compat Clean up unused imports in unit tests (#79893) 2 years ago
config [stable-2.16] Fix condition for unquoting configuration strings from ini files (#82388) 4 weeks ago
errors Clean up unit tests. (#78498) 2 years ago
executor Reduce number of implicit meta tasks (#84007) (#84046) 1 month ago
galaxy ansible-galaxy - fix exit code for failed role import (#82193) (#82412) 11 months ago
inventory Fix pointless statements in unit tests (#79940) 2 years ago
inventory_test_data/group_vars Merge branch 'v2_final' into devel_switch_v2 10 years ago
mock More unit test code coverage improvements (#81136) 1 year ago
module_utils Add unit tests for module_utils.compat.datetime (#81483) 1 year ago
modules iptables chain creation does not populate with a rule (#80257) 1 year ago
parsing Ensure that unsafe is more difficult to lose [stable-2.16] (#82293) 1 year ago
playbook Fix task.resolved_action callbacks (#82003) (#83330) 6 months ago
plugins Reduce number of implicit meta tasks (#84007) (#84046) 1 month ago
regex Add toggle to control invalid character substitution in group names (#52748) 6 years ago
template Clean up unused imports in unit tests (#79893) 2 years ago
utils [stable-2.16] Fix Test failure with cowsay installed/present (#83350) 6 months ago
vars More unit test code coverage improvements (#81136) 1 year ago
__init__.py Add empty-init code-smell script. (#18406) 8 years ago
requirements.txt Remove Python 3.9 support for the controller (#80973) 1 year ago
test_context.py Clean up unit test boilerplate. 5 years ago
test_no_tty.py ansible-test - Fix subprocess management. (#77641) 3 years ago