Commit Graph

19 Commits

Author SHA1 Message Date
75546678d9 Fix unittests 2016-04-12 08:01:07 -07:00
4b0aa1214c Ziploader
* Ziploader proof of concept (jimi-c)

* Cleanups to proof of concept ziploader branch:

* python3 compatible base64 encoding
* zipfile compression (still need to enable toggling this off for
  systems without zlib support in python)
* Allow non-wildcard imports (still need to make this recusrsive so that
  we can have module_utils code that imports other module_utils code.)
* Better tracebacks: module filename is kept and module_utils directory
  is kept so that tracebacks show the real filenames that the errors
  appear in.

* Make sure we import modules that are used into the module_utils files that they are used in.

* Set ansible version in a more pythonic way for ziploader than we were doing in module replacer

* Make it possible to set the module compression as an inventory var

This may be necessary on systems where python has been compiled without
zlib compression.

* Refactoring of module_common code:

* module replacer only replaces values that make sense for that type of
  file (example: don't attempt to replace python imports if we're in
  a powershell module).
* Implement configurable shebang support for ziploader wrapper
* Implement client-side constants (for SELINUX_SPECIAL_FS and SYSLOG)
  via environment variable.
* Remove strip_comments param as we're never going to use it (ruins line
  numbering)

* Don't repeat ourselves about detecting REPLACER

* Add an easy way to debug

* Port test-module to the ziploader-aware modify_module()

* strip comments and blank lines from the wrapper so we send less over the wire.

* Comments cleanup

* Remember to output write the module line itself in powershell modules

* for line in lines strips the newlines so we have to add them back in
2016-04-05 11:06:17 -07:00
8eadc1d8eb Adding more unit tests for AnsibleModule things in basic.py 2016-03-17 02:02:15 -04:00
b853e932d1 Adding unit tests for symbolic mode conversion stuff in basic.py 2016-03-01 16:41:57 -05:00
18240d350c Adding a skip for the literal_eval test on py3 2016-03-01 14:33:05 -05:00
0ea3a9d08d Removing tabs from test_basic.py 2016-03-01 14:15:15 -05:00
1de9357c2f Attempt at cleaning up issues introduced by new basic.py unit tests 2016-03-01 14:06:58 -05:00
e011f52557 Expanding unit tests for module_utils/basic.py 2016-03-01 13:53:13 -05:00
c2d188baff Hide values in json returns which were given in parameters marked no_log. 2015-10-20 12:42:36 -07:00
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
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
500e7a1263 Fix test: _to_filesystem_str produces byte strings 2015-09-30 18:46:49 +03:00
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
709dbbc7db Use 0oNNN octal syntax in test/ 2015-08-27 22:15:57 +03:00
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
4bc7703db3 Fixing some small bugs related to integration tests (v2) 2015-06-01 16:42:10 -05:00
e59d4f3b51 More module_utils/basic.py unit tests for v2 2015-05-28 01:26:04 -05:00
339a02c384 Started reworking module_utils/basic unit tests (v2) 2015-05-27 03:21:15 -05:00
a960fcd569 Adding module_utils tests from v1 to v2 2015-05-17 01:29:40 -05:00