Commit Graph

16 Commits (8552ad6bf19b7b04d57c8fa7770202cb151509af)

Author SHA1 Message Date
Matt Clay 8552ad6bf1 Fix docker connection unit tests.
- Use assertRaisesRegexp to make sure correct exceptions are raised.
- Set docker_command to avoid docker dependency (skips find_executable).
- Use a fake path for docker_command to make sure mock.patch is working.
9 years ago
Matt Clay 8c270ac75f Add empty-init code-smell script. (#18406)
Also removed boilerplate from otherwise empty __init__.py files
which should not contain any code (checked by empty-init script).
9 years ago
Ssawa 8e47b9bc70 Handle 'smart' scp_if_ssh option for fetch (#18125) 9 years ago
jctanner fff161f2f6 Smart mode for sftp+scp (#17813)
If the sftp fails, roll over to scp by default. This saves users
from having to know about the scp_if_ssh method when sftp is broken
on the remote host.
9 years ago
Toshio Kuratomi 0139298786 Have unittests import mock from ansible.compat so they work on py3 without mock installed from pypi 9 years ago
Toshio Kuratomi 4ed88512e4 Move uses of to_bytes, to_text, to_native to use the module_utils version (#17423)
We couldn't copy to_unicode, to_bytes, to_str into module_utils because
of licensing.  So once created it we had two sets of functions that did
the same things but had different implementations.  To remedy that, this
change removes the ansible.utils.unicode versions of those functions.
9 years ago
Toshio Kuratomi bd68c324ce Get the ssh plugin working with python3 (#17234) 9 years ago
Adrian Likins a4785c2691 Fix docker connection plugin version tests and py2.6 compat (#16841)
* Rm py2.7+ code in docker connection plugin

The docker connection plugin was using subprocess.check_output
which only exists in python 2.7 and later. Connection plugins
need to support python2.6 so this replaces it with Popen/communicate()

* Handle docker ver errors in docker connection

Add unit tests for DockerConnection

Fixes #16971
9 years ago
Jörg Thalheim 88482234e6
lxc connection plugin 10 years ago
Toshio Kuratomi 2b8a0cdddc Fix ssh connection unittests for python3.4 10 years ago
James Cammarata f0d3284ead Adding more unit tests for ssh connection plugin 10 years ago
James Cammarata 2f472fd4e9 Adding start of ssh connection unit tests 10 years ago
Toshio Kuratomi b70bf3b056 Use io.StringIO and io.BytesIO instead of StringIO.StringIO for compat with py3 10 years ago
Brian Coca b6d6c2e4db corrected all missing paths changes 10 years ago
James Cammarata e64989beb4 Moving ConnectionInformation -> PlayContext
Also making PlayContext a child class of the Playbook Base class,
which gives it access to all of the FieldAttribute code to ensure
field values are correctly typed after post_validation

Fixes #11381
11 years ago
James Cammarata 21fa385ce7 Reorganizing plugin unit tests and adding start of strategy tests (v2) 11 years ago