ansible/test/integration/targets
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
..
add_host
ansiballz_python
ansible adhoc: Load callbacks before sending v2_playbook_on_start (#67673) 2020-02-25 17:00:08 -05:00
ansible-doc
ansible-galaxy Update ansible-galaxy to handle role requirements (#68288) 2020-04-28 10:42:57 -04:00
ansible-galaxy-collection ansible-galaxy - Fix tar path traversal issue during install - CVE-2020-10691 (#68596) 2020-04-01 06:39:02 +10:00
ansible-runner adhoc: Load callbacks before sending v2_playbook_on_start (#67673) 2020-02-25 17:00:08 -05:00
ansible-test Fix ansible-test submodule handling. (#68759) 2020-04-08 01:15:49 -07:00
any_errors_fatal
apt Test installing a .deb that has deps, from a URL (#68332) 2020-03-24 13:59:42 -05:00
apt_key
apt_repository Revert "stricter permissions on atomic_move when creating new file (#68970)" (#68983) 2020-04-16 12:52:15 -04:00
args
assemble
assert
async
async_extra_data
async_fail
become
binary
binary_modules Add new arches/OSes for binary_modules tests (#69052) 2020-04-21 00:52:23 -07:00
binary_modules_posix Add new arches/OSes for binary_modules tests (#69052) 2020-04-21 00:52:23 -07:00
binary_modules_winrm
blockinfile
blocks
builtin_vars_prompt Rename tests (#68356) 2020-03-23 11:14:21 -05:00
callback_default Fix label lookup in the default callback for includes (#68822) 2020-04-09 13:27:58 -05:00
changed_when
check_mode
cli
collections Make sure collection is a list if a str is given (#69081) 2020-04-28 10:47:11 -05:00
collections_plugin_namespace Address compat issue for collection loading on py26 (#68219) 2020-03-23 11:14:21 -05:00
collections_relative_imports Add relative module_util support for powershell (#68321) 2020-04-01 09:01:18 +10:00
collections_runtime_pythonpath Merge pull request #67093 from sivel/acd-content-dir 2020-03-23 23:30:40 +01:00
command_shell
conditionals
config
connection
connection_local
connection_paramiko_ssh
connection_posix
connection_psrp
connection_ssh
connection_windows_ssh
connection_winrm
copy [copy] Add some test coverage for check_mode (#68895) 2020-04-17 16:09:32 -05:00
cron Removing a cron file when the 'name' parameter is specified is now allowed (#57471). Added integration tests to validate new behavior. (#65640) 2020-02-15 14:52:36 +00:00
debconf
debug
delegate_to
dnf Testing: Add support for CentOS Linux On Power platform (#68130) 2020-04-15 16:22:17 -07:00
dpkg_selections
egg-info Fix references to old egg-info directory. 2020-03-30 13:56:43 -07:00
embedded_module
environment
error_from_connection
expect
facts_d
failed_when
fetch fixed fetch traversal from slurp (#68720) 2020-04-08 14:28:51 -04:00
file Pull timezone's incidental file coverage into file tests (#68247) 2020-03-23 15:28:53 -07:00
fileglob Fix fileglob when using 'file*' vs 'stuff/file*' (#68945) 2020-04-17 09:51:05 -04:00
filter_core add test coverage for core filters (#68518) 2020-03-27 17:18:27 -07:00
filter_mathstuff [mathstuff] Get coverage into the 90% range (#68395) 2020-03-25 15:33:37 -05:00
filter_urls coverage for filter/urls.py, including fallback to custom implementations (#68412) 2020-03-25 16:23:14 -05:00
filter_urlsplit
find
gathering
gathering_facts prevent ansible_facts injection (#68431) 2020-03-24 15:46:56 -04:00
get_url
getent
git [git] make force=True apply to git fetches (#68691) 2020-04-06 15:25:24 -05:00
group Test system users and groups. 2020-02-27 21:45:18 -08:00
group_by
groupby_filter
handlers
hash
hosts_field
ignore_errors
ignore_unreachable
incidental_aws_codebuild Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_aws_step_functions_state_machine Fix incidental test stability. (#68125) 2020-03-23 11:14:21 -05:00
incidental_azure_rm_functionapp Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_azure_rm_mariadbserver Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_azure_rm_resource Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_azure_rm_webapp Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_cloud_init_data_facts Fourth batch of incidental integration tests. (#67873) 2020-02-28 20:37:50 -08:00
incidental_cloudformation Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_connection_chroot Fourth batch of incidental integration tests. (#67873) 2020-02-28 20:37:50 -08:00
incidental_consul Testing: Add support for CentOS Linux On Power platform (#68130) 2020-04-15 16:22:17 -07:00
incidental_cs_common Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_cs_role_permission Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_cs_service_offering Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_deploy_helper Fourth batch of incidental integration tests. (#67873) 2020-02-28 20:37:50 -08:00
incidental_ec2_instance Fix code coverage in tests. 2020-03-26 22:41:12 -07:00
incidental_flatpak_remote Fourth batch of incidental integration tests. (#67873) 2020-02-28 20:37:50 -08:00
incidental_hcloud_server Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_inventory_aws_ec2 Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_inventory_docker_swarm Testing: Add support for CentOS Linux On Power platform (#68130) 2020-04-15 16:22:17 -07:00
incidental_inventory_foreman Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_inventory_vmware_vm_inventory Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_ios_file First batch of incidental integration tests. (#67717) 2020-02-24 17:31:14 -08:00
incidental_k8s Fix code coverage in tests. 2020-03-26 22:41:12 -07:00
incidental_lookup_hashi_vault Testing: Add support for CentOS Linux On Power platform (#68130) 2020-04-15 16:22:17 -07:00
incidental_lookup_rabbitmq Fourth batch of incidental integration tests. (#67873) 2020-02-28 20:37:50 -08:00
incidental_lvg Fourth batch of incidental integration tests. (#67873) 2020-02-28 20:37:50 -08:00
incidental_mongodb_parameter Fourth batch of incidental integration tests. (#67873) 2020-02-28 20:37:50 -08:00
incidental_nios_prepare_tests Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_nios_txt_record Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_postgresql_user Fourth batch of incidental integration tests. (#67873) 2020-02-28 20:37:50 -08:00
incidental_script_inventory_vmware_inventory Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_selinux Fourth batch of incidental integration tests. (#67873) 2020-02-28 20:37:50 -08:00
incidental_setup_docker Update tests to use RHEL 7.8. (#68787) 2020-04-08 21:09:52 -07:00
incidental_setup_ec2 Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_setup_flatpak_remote Fourth batch of incidental integration tests. (#67873) 2020-02-28 20:37:50 -08:00
incidental_setup_mongodb Skip mongodb tests on all centos versions. 2020-03-01 10:33:42 -08:00
incidental_setup_mysql_db Update docker.txt to use the OpenSUSE 15.1 container image (devel edition) (#68785) 2020-04-09 00:26:59 -07:00
incidental_setup_openssl Revert "Cap cryptography version for macOS openssl test (#69083)" (#69126) 2020-04-23 08:49:09 -05:00
incidental_setup_postgresql_db Fourth batch of incidental integration tests. (#67873) 2020-02-28 20:37:50 -08:00
incidental_setup_rabbitmq Fourth batch of incidental integration tests. (#67873) 2020-02-28 20:37:50 -08:00
incidental_setup_tls Fourth batch of incidental integration tests. (#67873) 2020-02-28 20:37:50 -08:00
incidental_setup_zabbix Fourth batch of incidental integration tests. (#67873) 2020-02-28 20:37:50 -08:00
incidental_sts_assume_role Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_synchronize Fourth batch of incidental integration tests. (#67873) 2020-02-28 20:37:50 -08:00
incidental_timezone Fourth batch of incidental integration tests. (#67873) 2020-02-28 20:37:50 -08:00
incidental_tower_credential_type Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_tower_receive Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_ufw Testing: Add support for CentOS Linux On Power platform (#68130) 2020-04-15 16:22:17 -07:00
incidental_vmware_guest Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_vmware_guest_custom_attributes Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_vmware_host_hyperthreading Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_vmware_prepare_tests Second batch of incidental integration tests. (#67765) 2020-02-25 23:18:50 -08:00
incidental_vyos_config First batch of incidental integration tests. (#67717) 2020-02-24 17:31:14 -08:00
incidental_vyos_lldp_interfaces First batch of incidental integration tests. (#67717) 2020-02-24 17:31:14 -08:00
incidental_vyos_logging First batch of incidental integration tests. (#67717) 2020-02-24 17:31:14 -08:00
incidental_vyos_prepare_tests First batch of incidental integration tests. (#67717) 2020-02-24 17:31:14 -08:00
incidental_vyos_static_route First batch of incidental integration tests. (#67717) 2020-02-24 17:31:14 -08:00
incidental_win_copy Third batch of incidental integration tests. (#67830) 2020-02-27 16:05:47 -08:00
incidental_win_data_deduplication Third batch of incidental integration tests. (#67830) 2020-02-27 16:05:47 -08:00
incidental_win_dsc Third batch of incidental integration tests. (#67830) 2020-02-27 16:05:47 -08:00
incidental_win_hosts Third batch of incidental integration tests. (#67830) 2020-02-27 16:05:47 -08:00
incidental_win_lineinfile Third batch of incidental integration tests. (#67830) 2020-02-27 16:05:47 -08:00
incidental_win_ping Third batch of incidental integration tests. (#67830) 2020-02-27 16:05:47 -08:00
incidental_win_prepare_tests Third batch of incidental integration tests. (#67830) 2020-02-27 16:05:47 -08:00
incidental_win_psexec Third batch of incidental integration tests. (#67830) 2020-02-27 16:05:47 -08:00
incidental_win_reboot Third batch of incidental integration tests. (#67830) 2020-02-27 16:05:47 -08:00
incidental_win_security_policy Third batch of incidental integration tests. (#67830) 2020-02-27 16:05:47 -08:00
incidental_xml Testing: Add support for CentOS Linux On Power platform (#68130) 2020-04-15 16:22:17 -07:00
incidental_zabbix_host Fourth batch of incidental integration tests. (#67873) 2020-02-28 20:37:50 -08:00
include_import include_role: Strictly check string datatype for *_from (#68958) 2020-04-17 10:57:41 +05:30
include_parent_role_vars
include_vars
include_vars-ad-hoc
include_when_parent_is_dynamic Add dynamic and static include tests. (#68200) 2020-03-23 11:14:21 -05:00
include_when_parent_is_static Add dynamic and static include tests. (#68200) 2020-03-23 11:14:21 -05:00
includes
infra Rename tests (#68356) 2020-03-23 11:14:21 -05:00
interpreter_discovery_python
inventory
inventory_yaml
jinja2_native_types native types: literal_eval all the things (#68938) 2020-04-17 14:59:52 +02:00
known_hosts
limit_inventory Rename some integration tests. 2020-02-14 13:34:26 -08:00
lineinfile
lookup_config coverage for lookup_config (#68566) 2020-03-31 09:57:50 -05:00
lookup_dict Skip lookup tests on Python 2.6. 2020-03-02 00:06:18 -08:00
lookup_env Skip lookup tests on Python 2.6. 2020-03-02 00:06:18 -08:00
lookup_file Skip lookup tests on Python 2.6. 2020-03-02 00:06:18 -08:00
lookup_first_found Skip lookup tests on Python 2.6. 2020-03-02 00:06:18 -08:00
lookup_indexed_items Skip lookup tests on Python 2.6. 2020-03-02 00:06:18 -08:00
lookup_ini Skip lookup tests on Python 2.6. 2020-03-02 00:06:18 -08:00
lookup_inventory_hostnames Skip lookup tests on Python 2.6. 2020-03-02 00:06:18 -08:00
lookup_items Skip lookup tests on Python 2.6. 2020-03-02 00:06:18 -08:00
lookup_lines Skip lookup tests on Python 2.6. 2020-03-02 00:06:18 -08:00
lookup_list coverage for lookup_list (#68683) 2020-04-06 13:39:18 -05:00
lookup_nested Skip lookup tests on Python 2.6. 2020-03-02 00:06:18 -08:00
lookup_password Skip lookup tests on Python 2.6. 2020-03-02 00:06:18 -08:00
lookup_pipe Skip lookup tests on Python 2.6. 2020-03-02 00:06:18 -08:00
lookup_random_choice Skip lookup tests on Python 2.6. 2020-03-02 00:06:18 -08:00
lookup_sequence Skip lookup tests on Python 2.6. 2020-03-02 00:06:18 -08:00
lookup_subelements Skip lookup tests on Python 2.6. 2020-03-02 00:06:18 -08:00
lookup_template Skip lookup tests on Python 2.6. 2020-03-02 00:06:18 -08:00
lookup_together Skip lookup tests on Python 2.6. 2020-03-02 00:06:18 -08:00
lookup_url Skip lookup tests on Python 2.6. 2020-03-02 00:06:18 -08:00
lookup_vars Skip lookup tests on Python 2.6. 2020-03-02 00:06:18 -08:00
loop_control
loops
meta_tasks
module_defaults
module_no_log Add more integration tests. (#68972) 2020-04-16 00:53:08 -07:00
module_precedence Filter BLACKLIST_EXTS in PluginLoader (#69029) 2020-04-22 17:20:12 -05:00
module_tracebacks
module_utils
module_utils_Ansible.AccessToken Split C# module utils to their own test target (#67910) 2020-03-02 15:16:31 +10:00
module_utils_Ansible.Basic Split C# module utils to their own test target (#67910) 2020-03-02 15:16:31 +10:00
module_utils_Ansible.Become Split C# module utils to their own test target (#67910) 2020-03-02 15:16:31 +10:00
module_utils_Ansible.ModuleUtils.AddType Separated ps module_util test targets, added WebRequest tests (#67914) 2020-03-02 16:12:08 +10:00
module_utils_Ansible.ModuleUtils.ArgvParser Separated ps module_util test targets, added WebRequest tests (#67914) 2020-03-02 16:12:08 +10:00
module_utils_Ansible.ModuleUtils.Backup Separated ps module_util test targets, added WebRequest tests (#67914) 2020-03-02 16:12:08 +10:00
module_utils_Ansible.ModuleUtils.CamelConversion Separated ps module_util test targets, added WebRequest tests (#67914) 2020-03-02 16:12:08 +10:00
module_utils_Ansible.ModuleUtils.CommandUtil Separated ps module_util test targets, added WebRequest tests (#67914) 2020-03-02 16:12:08 +10:00
module_utils_Ansible.ModuleUtils.FileUtil Separated ps module_util test targets, added WebRequest tests (#67914) 2020-03-02 16:12:08 +10:00
module_utils_Ansible.ModuleUtils.Legacy Separated ps module_util test targets, added WebRequest tests (#67914) 2020-03-02 16:12:08 +10:00
module_utils_Ansible.ModuleUtils.LinkUtil Separated ps module_util test targets, added WebRequest tests (#67914) 2020-03-02 16:12:08 +10:00
module_utils_Ansible.ModuleUtils.PrivilegeUtil Separated ps module_util test targets, added WebRequest tests (#67914) 2020-03-02 16:12:08 +10:00
module_utils_Ansible.ModuleUtils.SID Separated ps module_util test targets, added WebRequest tests (#67914) 2020-03-02 16:12:08 +10:00
module_utils_Ansible.ModuleUtils.WebRequest WebRequest - Fix use_proxy: no on module options (#68603) 2020-04-02 07:17:50 +10:00
module_utils_Ansible.Privilege Split C# module utils to their own test target (#67910) 2020-03-02 15:16:31 +10:00
module_utils_Ansible.Process Split C# module utils to their own test target (#67910) 2020-03-02 15:16:31 +10:00
module_utils_Ansible.Service Split C# module utils to their own test target (#67910) 2020-03-02 15:16:31 +10:00
no_log
old_style_cache_plugins
old_style_modules_posix
omit
order
package Enable passing tests on power. 2020-04-20 10:07:54 -07:00
package_facts
parsing
path_lookups
path_with_comma_in_inventory Rename some integration tests. 2020-02-14 13:34:26 -08:00
pause
ping
pip [pip] Enable virtualenv_command to have arguments 2020-04-23 18:13:30 +02:00
play_iterator Fix --start-at-task when skipping tasks with no name (#68951) 2020-04-21 09:39:17 +02:00
plugin_config_for_inventory Rename some integration tests. 2020-02-14 13:34:26 -08:00
plugin_filtering
plugin_loader
plugin_namespace
prepare_http_tests
prepare_tests/tasks
pull
raw update ActionBase._low_level_execute_command to honor executable (#68315) 2020-04-22 11:56:35 -05:00
reboot
rel_plugin_loading
remote_tmp
replace
retry_task_name_in_callback Rename callback_retry_task_name test. 2020-02-18 11:16:37 -08:00
roles
rpm_key
run_modules
script
service Enable service integration tests for FreeBSD (#68980) 2020-04-17 10:41:08 -07:00
service_facts
set_fact
setup_cron
setup_deb_repo
setup_epel/tasks
setup_nobody
setup_paramiko
setup_passlib/tasks
setup_pexpect/tasks
setup_remote_constraints
setup_remote_tmp_dir
setup_rpm_repo Fix yum test case on ppc64le 2020-04-23 14:48:30 -07:00
setup_win_printargv Separated ps module_util test targets, added WebRequest tests (#67914) 2020-03-02 16:12:08 +10:00
shell
slurp
special_vars
stat
strategy_linear
subversion Enable passing tests on power. 2020-04-20 10:07:54 -07:00
systemd
tags
task_ordering
tasks Add more integration tests. (#68972) 2020-04-16 00:53:08 -07:00
template Prevent templating unused variables for {%include%} (#68749) 2020-04-14 10:27:02 +02:00
template_jinja2_latest
templating_lookups Templating: make sure only one variable results are cached (#67429) 2020-02-19 18:04:01 -05:00
templating_settings
test_core Rename tests (#68356) 2020-03-23 11:14:21 -05:00
throttle
unarchive Enable passing tests on power. 2020-04-20 10:07:54 -07:00
unicode
until
uri
user Test system users and groups. 2020-02-27 21:45:18 -08:00
var_blending
var_precedence
var_templating
vault fix vault temp file handling (#68433) 2020-03-25 15:24:04 -04:00
wait_for
wait_for_connection Test the delay option in wait_for_connection. 2020-02-25 19:27:18 -08:00
want_json_modules_posix
win_async_wrapper
win_become
win_exec_wrapper windows - fix up env var quoting for unicode single quotes (#68968) 2020-04-16 20:24:23 +10:00
win_fetch Consolidate Windows tests to one group. 2020-03-23 11:14:21 -05:00
win_module_utils Separated ps module_util test targets, added WebRequest tests (#67914) 2020-03-02 16:12:08 +10:00
win_raw
win_script
windows-minimal Create a dedicated windows-minimal test target. (#67987) 2020-03-03 18:36:37 -08:00
windows-paths
yum Fix yum test case on ppc64le 2020-04-23 14:48:30 -07:00
yum_repository Ignore GPG key checks on test repo 2020-04-23 14:48:55 -07:00