Fix test-module failing to validate args (#41004)

* Fix test-module failing to validate args

The test-module pass a wrong argument _ansible_tmp cause the validation failed.
Change the argument _ansible_tmp to _ansible_tmpdir to fix this.

* Add a integration test for test-module.

Prior to this change, we don't have a test for test-module.

This change ensure the correctness of test-module script.
This commit is contained in:
Zhikang Zhang 2018-06-01 15:02:56 -04:00 committed by Toshio Kuratomi
commit b578bf9e20
2 changed files with 5 additions and 1 deletions

View file

@ -125,7 +125,7 @@ def boilerplate_module(modfile, args, interpreters, check, destfile):
# default selinux fs list is pass in as _ansible_selinux_special_fs arg
complex_args['_ansible_selinux_special_fs'] = C.DEFAULT_SELINUX_SPECIAL_FS
complex_args['_ansible_tmp'] = C.DEFAULT_LOCAL_TMP
complex_args['_ansible_tmpdir'] = C.DEFAULT_LOCAL_TMP
complex_args['_ansible_keep_remote_files'] = C.DEFAULT_KEEP_REMOTE_FILES
if args.startswith("@"):