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/config
snipfoo 5f4e332e37
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
2 months ago
..
manager Require `from __future__ import annotations` (#81902) 8 months ago
__init__.py [config] coerce more to string when 'type: str' (#72172) 4 years ago
test.cfg config tests 7 years ago
test.yml config tests 7 years ago
test2.cfg config tests 7 years ago
test3.cfg Add test for 256-color configuration values (#78613) 10 months ago
test_manager.py Fix condition for unquoting configuration strings from ini files (#82388) 2 months ago