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
David Shrewsbury ff47d3f766
Make sure collection is a list if a str is given (#69081)
* Make sure collection is a list if a str is given

* Call field validation early on collections

Because we are doing work on modifying the collections value before
it is actually validated, we can validate it ourselves early to make
sure the user supplies either a string or list. Dicts are not valid.

The new validation allows us to simplify the _ensure_default_collection()
function. And since the field is now static, we no longer need to specify
a default for it, which also allows us to simplify the function. Since
the default is now removed, we can also remove the sanity/ignore.txt entry
for collectionsearch.py.

New unit tests are added (and the existing one modified) that allow us to
make sure that we throw a parser error if a user specifies something other
than a string or list for the collections value everywhere it can be specified.

* Revert removing the collection default

The default is actually used, so restore it.

* Fix unit tests in test_helpers.py affected by early collection validation
5 years ago
..
cli Use Templar for galaxy skeletons (#69106) 5 years ago
compat Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
config Fix inline vaults for plugins in ensure_type (#67492) 5 years ago
errors Remove empty overridden unittest.setUp and unittest.tearDown methods. 5 years ago
executor Try to load action plugin from the same collection as the module (#66701) 5 years ago
galaxy ansible-galaxy - Fix tar path traversal issue during install - CVE-2020-10691 (#68596) 5 years ago
inventory Clean up unit tests to assist with migration. (#67875) 5 years ago
inventory_test_data/group_vars
mock Replace TestCase.assertEquals with TestCase.assertEqual. 5 years ago
module_utils Expose to_<str> as a public function (#68965) 5 years ago
modules Remove unused unit test files. 5 years ago
parsing Replace TestCase.assertEquals with TestCase.assertEqual. 5 years ago
playbook Make sure collection is a list if a str is given (#69081) 5 years ago
plugins windows - fix up env var quoting for unicode single quotes (#68968) 5 years ago
regex Add toggle to control invalid character substitution in group names (#52748) 6 years ago
template Do not treat AnsibleUndefined as being unsafe (#65202) 5 years ago
utils Fix colorization to not extend across newline boundary (#68517) 5 years ago
vars Remove empty setUp/tearDown/tearDownClass methods in test classes. 5 years ago
__init__.py
requirements.txt Remove unnecessary unit test requirements. 5 years ago
test_constants.py
test_context.py Unit tests: remove unused imports (#59740) 5 years ago