summaryrefslogtreecommitdiffstats
path: root/test/units/config
diff options
context:
space:
mode:
authorRick Elrod <rick@elrod.me>2020-10-14 18:53:08 +0200
committerGitHub <noreply@github.com>2020-10-14 18:53:08 +0200
commit3b40c6f3b795ac226c5cf0067ff5e181669e2097 (patch)
treef90935a84ed365734bdd5e6e5a1d830718fe8e19 /test/units/config
parentUpdate the porting guide for a new ansible version (#72211) (diff)
downloadansible-3b40c6f3b795ac226c5cf0067ff5e181669e2097.tar.xz
ansible-3b40c6f3b795ac226c5cf0067ff5e181669e2097.zip
[config] coerce more to string when 'type: str' (#72172)
Change: - When a plugin defines `type: str` on a parameter, treat more kinds of input as a string instead of whatever it is parsed as. Test Plan: - New unit tests - CI Signed-off-by: Rick Elrod <rick@elrod.me>
Diffstat (limited to 'test/units/config')
-rw-r--r--test/units/config/__init__.py0
-rw-r--r--test/units/config/test_manager.py12
2 files changed, 12 insertions, 0 deletions
diff --git a/test/units/config/__init__.py b/test/units/config/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/test/units/config/__init__.py
diff --git a/test/units/config/test_manager.py b/test/units/config/test_manager.py
index d103e5e661..15c9c1fb50 100644
--- a/test/units/config/test_manager.py
+++ b/test/units/config/test_manager.py
@@ -60,6 +60,18 @@ ensure_test_data = [
('a', 'string', string_types),
('Café', 'string', string_types),
('', 'string', string_types),
+ ('29', 'str', string_types),
+ ('13.37', 'str', string_types),
+ ('123j', 'string', string_types),
+ ('0x123', 'string', string_types),
+ ('true', 'string', string_types),
+ ('True', 'string', string_types),
+ (0, 'str', string_types),
+ (29, 'str', string_types),
+ (13.37, 'str', string_types),
+ (123j, 'string', string_types),
+ (0x123, 'string', string_types),
+ (True, 'string', string_types),
('None', 'none', type(None))
]