James Cammarata
1de9357c2f
Attempt at cleaning up issues introduced by new basic.py unit tests
2016-03-01 14:06:58 -05:00
James Cammarata
e011f52557
Expanding unit tests for module_utils/basic.py
2016-03-01 13:53:13 -05:00
Toshio Kuratomi
b70bf3b056
Use io.StringIO and io.BytesIO instead of StringIO.StringIO for compat with py3
2016-02-26 16:43:05 -08:00
Toshio Kuratomi
a68d90a71a
rework run_command's env setting to not change os.environ for the rest of the module.
...
New param to run_command to modify the environment for just this invocation.
Documentation and comment adjustments.
2016-01-20 12:03:32 -08:00
Brian Coca
d89d7951e6
fixed tests to follow new invocation structure
...
also added maxdiff setting to see issues clearly when they happen
2015-12-23 11:45:07 -05:00
Toshio Kuratomi
e2d9f4e2f2
Fix unittests for return of invocation from fail_json and exit_json
2015-12-19 15:49:59 -08:00
Michael Scherer
a7ac98262d
Make module_utils.known_hosts.get_fqdn work on ipv6
2015-12-14 19:30:54 +01:00
Michael Scherer
3c4d2fc6f2
Add tests for ansible.module_utils.known_hosts
2015-12-12 20:03:35 +01:00
Toshio Kuratomi
cfeef81303
For now, skip tests of module_utils/basic functions that are failing on
...
py3 (these are only run on the target hosts, not on the controller).
2015-12-03 14:16:29 -08:00
Toshio Kuratomi
e00012994e
Also some unicode tests for return_values()
2015-12-02 21:09:53 -08:00
Toshio Kuratomi
5fdfe6a0f2
Add some test data that has unicode values
2015-12-02 21:07:41 -08:00
Brano Zarnovican
90f99f29ae
unittest cover for 'run_command'
...
All os.*, subprocess.* is mocked to avoid side-effects.
Tests are skipped in Py3, since 'run_command' is not Py3-ready, yet.
2015-11-17 11:57:50 +01:00
Toshio Kuratomi
5a0e63af1e
Workaround seeming bug in python-2.6's sys.exit()
2015-10-21 11:54:02 -07:00
Toshio Kuratomi
6e5055e786
Update the use of no_log values to cover everything that heuristic_log_sanitize does.
...
Fixes #12792
2015-10-21 08:15:46 -07:00
Toshio Kuratomi
c2d188baff
Hide values in json returns which were given in parameters marked no_log.
2015-10-20 12:42:36 -07:00
Marius Gedminas
225fe85530
Skip test_module_utils_basic_ansible_module_creation on Python 3
...
This reverts commit 073f10a52a
and instead
disables the failing test.
We're focusing on Python 3 support on the controller first; modules will
come later.
2015-10-14 09:32:26 +03:00
Toshio Kuratomi
15d7f53846
AnsibleModules.log() fix for python3
...
Also add unittests for AnsibleModules.log()
Fixes #12586
2015-10-12 13:30:27 -07:00
Marius Gedminas
0371b14567
Fix test: selinux gets passed byte strings
...
(I don't have a system with selinux to test if the module still wants
byte strings even on Python 3.)
2015-09-30 18:46:50 +03:00
Marius Gedminas
500e7a1263
Fix test: _to_filesystem_str produces byte strings
2015-09-30 18:46:49 +03:00
Marius Gedminas
f7571cb37f
Python 3: there's no __builtin__ module
...
This caused an ImportError in a test module and showed up as one test
failure. Now the test module can get imported and many more tests fail
(on Python 3). Such is life. ;-)
2015-09-30 18:40:47 +03:00
Marius Gedminas
709dbbc7db
Use 0oNNN octal syntax in test/
2015-08-27 22:15:57 +03:00
Matt Martz
49d19e82ab
Get tests passing
...
The largest failure in the tests was due to selinux not being installed.
The tests don't require it to be installed, so mock the import.
2015-06-05 16:05:39 -05:00
James Cammarata
4bc7703db3
Fixing some small bugs related to integration tests (v2)
2015-06-01 16:42:10 -05:00
James Cammarata
e59d4f3b51
More module_utils/basic.py unit tests for v2
2015-05-28 01:26:04 -05:00
James Cammarata
339a02c384
Started reworking module_utils/basic unit tests (v2)
2015-05-27 03:21:15 -05:00
James Cammarata
a960fcd569
Adding module_utils tests from v1 to v2
2015-05-17 01:29:40 -05:00