James Cammarata
6b1648f708
Mass update of test/ directory from devel
9 years ago
James Cammarata
1ccd534cec
Clean up jsonify unit test with format to remove json lib differences
9 years ago
James Cammarata
b71fbb9364
Fixing up jsonify and adding unit tests
9 years ago
James Cammarata
f7dc7e3aab
Make sure dict strings are unicode for jsonify
9 years ago
James Cammarata
b0c72c59e4
Adding coding header to action plugin unit test file
9 years ago
James Cammarata
2347e5c14c
More unit tests for ActionBase
9 years ago
James Cammarata
971b471595
issue callbacks per item and retry fails
...
- now workers passes queue to task_executor so it can send back events per item and on retry attempt
- updated result class to pass along events to strategy
- base strategy updated to forward new events to callback
- callbacks now remove 'items' on final result but process them directly when invoked per item
- new callback method to deal with retry attempt messages (also now obeys nolog)
- updated tests to match new signature of task_executor
fixes #14558
fixes #14072
9 years ago
Brian Coca
35a5fe85f0
shell + become fixes
...
1 less level of shell + quoting
simplified become commands, less quote and shell
9 years ago
Toshio Kuratomi
849def8d6e
Squashing was occuring even though pkgs didn't have a template that would be affected by squash
...
This broke other uses of looping (looping for delegate_to in the
reported bug)
Fixes #13980
9 years ago
Brian Coca
97cd0bc803
fixed unit test to match new output of become/su
9 years ago
Brian Coca
8647fdc7f2
go back to defaulting wrapping commands in shell
...
this was taken out in an effort to default to the user's shell but creates issues as this is not known ahead of time
and its painful to set executable and shell_type for all servers, it should only be needed for those that restrict the user
to specific shells and when /bin/sh is not available. raw and command may still bypass this by explicitly passing None.
fixes #13882
still conditional
9 years ago
James Cammarata
0d2a9d3f53
Relocate use of ERROR to display class, to avoid doubling up
9 years ago
Toshio Kuratomi
63404821da
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.
9 years ago
Brian Coca
c06b2e4622
correctly deals with non serializable type
...
combine_vars shoudl really be data types, but some just get in
in test, add dict to mock and avoid combine_vars using object
9 years ago
Toshio Kuratomi
dd59fc176e
Going to do this in the connection plugin
...
Revert "Fix make tests-py3 on devel. Fix for https://github.com/ansible/ansible/issues/13638 ."
This reverts commit 725e40c5e6
.
9 years ago
Brian Coca
2786908bac
fixed tests to follow new invocation structure
...
also added maxdiff setting to see issues clearly when they happen
9 years ago
Yannig Perré
725e40c5e6
Fix make tests-py3 on devel. Fix for https://github.com/ansible/ansible/issues/13638 .
9 years ago
Brian Coca
c605cd37f6
allow for non standard hostnames
...
* Changed parse_addresses to throw exceptions instead of passing None
* Switched callers to trap and pass through the original values.
* Added very verbose notice
* Look at deprecating this and possibly validate at plugin instead
fixes #13608
9 years ago
Matt Clay
ce17557b84
Fixed import typo for memcache module in tests.
...
The typo caused the test for the memcached cache plugin to be skipped
even when the necessary memcache python module was installed.
9 years ago
Toshio Kuratomi
d2bf615780
Fix unittests for return of invocation from fail_json and exit_json
9 years ago
James Cammarata
9e52a7c769
Attempt at fixing strategy unit test failures on py2.6 and py3
9 years ago
Michael Scherer
b6dac26224
Make module_utils.known_hosts.get_fqdn work on ipv6
9 years ago
Michael Scherer
a7a3a34987
Add tests for ansible.module_utils.known_hosts
9 years ago
Toshio Kuratomi
66be9d06c4
Minor: Correct type pyhton => python
9 years ago
James Cammarata
0b66ec0ddd
Cleanup strategy tests broken by new forking strategy
9 years ago
Brian Coca
0533e0bc96
fixed doas from getting stuck when needing passwords
...
Also adjusted test to match new doas become output
fixes #13449
9 years ago
James Cammarata
cd76552724
Changing up how host (in)equality is checked
...
Fixes #13397
9 years ago
Toshio Kuratomi
f8911adbbc
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).
9 years ago
Toshio Kuratomi
b9fbfaf64e
Also some unicode tests for return_values()
9 years ago
Toshio Kuratomi
2c5c7b54f6
Add some test data that has unicode values
9 years ago
James Cammarata
f96730003b
Also make sure remote_user is defaulted correctly for delegated hosts
...
Fixes #13323
9 years ago
James Cammarata
91500f8f5f
Fix include param precedence in variable manager
9 years ago
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.
9 years ago
Toshio Kuratomi
318bfbb207
Migrate cli and dependencies to use global display
9 years ago
Toshio Kuratomi
aa034f4fcf
Add unit tests for issue #12976
9 years ago
Toshio Kuratomi
37052a983a
Fix unittest dailure with the new squash items code
9 years ago
Brian Coca
174de1161b
fixed removing -n in password sudo tests
9 years ago
Brian Coca
b2fc5142eb
moved sudo -S and -n into configurable flags as they might be absent in much older systems
...
if password is supplied exsiting -n would get remove from flags
9 years ago
Toshio Kuratomi
4203850d1a
Break apart a looped dependency to show a warning when parsing playbooks
...
Display a warning when a dict key is overwritten by pyyaml
Fixes #12888
9 years ago
Brian Coca
f78c82b9ee
don't set user to current user
...
also remove condition to bypass setting user if user matches current user
this enables forcing user when set to the same user as current user and ignoring .ssh/config
while keeping .ssh/config with current user if nothing is specified.
9 years ago
Toshio Kuratomi
ce2b18174e
Merge pull request #12878 from ansible/invocation-fix
...
Invocation fix
9 years ago
Toshio Kuratomi
2e87c1f74e
Two fixes to action plugins
...
* Fix the task_vars parameter to not default to a mutable type (dict)
* Implement invocation in the base class's run() method have each action
module call the run() method's implemention in the base class.
* Return values from the action plugins' run() method takes the return
value from the base class run() method into account so that invocation
makes its way to the output.
Fixes #12869
9 years ago
James Cammarata
86de1429e5
Cleaning up FIXMEs
9 years ago
Toshio Kuratomi
5a0e63af1e
Workaround seeming bug in python-2.6's sys.exit()
9 years ago
Toshio Kuratomi
6e5055e786
Update the use of no_log values to cover everything that heuristic_log_sanitize does.
...
Fixes #12792
9 years ago
Toshio Kuratomi
c2d188baff
Hide values in json returns which were given in parameters marked no_log.
9 years ago
Brian Coca
6d87bd405d
Merge pull request #12765 from bcoca/lookup_inventory_hostname
...
implemented inventory_hostname lookup in v2
9 years ago
Marius Gedminas
ec3ada1cda
Fix test on Python 3: vault code expects bytes
...
(All tests now succeed on Python 3.5)
9 years ago
Marius Gedminas
5c70f932bd
Fix test on Python 3: vault code expects bytes
...
(Third failing test out of four.)
9 years ago
Marius Gedminas
a1d95536f9
Fix test on Python 3: vault code expects bytes
...
(Different test than the last commit.)
9 years ago