ansible/test/integration/targets/collections
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
2020-04-28 10:47:11 -05:00
..
collection_root_sys/ansible_collections/testns Add missing boilerplate to collections test. (#60507) 2019-08-13 12:20:14 -07:00
collection_root_user/ansible_collections Filter BLACKLIST_EXTS in PluginLoader (#69029) 2020-04-22 17:20:12 -05:00
collections/ansible_collections fix using inventory and cache plugins in a collection (#56469) 2020-03-26 12:05:46 -04:00
custom_vars_plugins Support vars plugins in collections (#61078) 2019-11-04 11:41:14 -05:00
inventory_cache fix using inventory and cache plugins in a collection (#56469) 2020-03-26 12:05:46 -04:00
library Add missing boilerplate to collections test. (#60507) 2019-08-13 12:20:14 -07:00
roles Allow a collection role to call a standalone role by default (#69102) 2020-04-22 13:58:08 -05:00
a.statichost.yml
aliases Address compat issue for collection loading on py26 (#68219) 2020-03-23 11:14:21 -05:00
cache.statichost.yml fix using inventory and cache plugins in a collection (#56469) 2020-03-26 12:05:46 -04:00
check_populated_inventory.yml fix using inventory and cache plugins in a collection (#56469) 2020-03-26 12:05:46 -04:00
includeme.yml
invocation_tests.yml Action module xross coll (#68080) 2020-03-25 11:57:53 -04:00
posix.yml Make sure collection is a list if a str is given (#69081) 2020-04-28 10:47:11 -05:00
runme.sh fix using inventory and cache plugins in a collection (#56469) 2020-03-26 12:05:46 -04:00
vars_plugin_tests.sh Inventory CLI - Ignore settings for when vars plugins should run (#65073) 2019-11-25 13:16:03 -05:00
windows.yml Change collection PS util import pattern (#61307) 2019-08-27 16:02:27 -07:00