Commit graph

25 commits

Author SHA1 Message Date
James Cammarata
e02b98274b 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
2016-02-23 15:07:06 -05:00
Toshio Kuratomi
0e410bbc8a 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
2016-01-27 21:55:00 -08:00
Toshio Kuratomi
318bfbb207 Migrate cli and dependencies to use global display 2015-11-11 10:44:22 -08:00
Toshio Kuratomi
aa034f4fcf Add unit tests for issue #12976 2015-11-05 10:52:37 -08:00
Toshio Kuratomi
37052a983a Fix unittest dailure with the new squash items code 2015-11-05 10:45:54 -08:00
James Cammarata
0e1a5919c8 Adding unit tests for PlaybookExecutor _get_serialized_batches 2015-10-12 11:27:37 -04:00
James Cammarata
dfa33d0f23 Tweak variable manager use in role includes to avoid test failures 2015-09-30 08:05:55 -04:00
Marius Gedminas
c22f4ee697 Add a comment explaining why async = 1 in the test 2015-09-07 19:46:05 +03:00
Marius Gedminas
1a1c9203e2 Python 3: fix TypeError: unorderable types in test
The full error was

======================================================================
ERROR: test_task_executor_execute (units.executor.test_task_executor.TestTaskExecutor)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mg/src/ansible/test/units/executor/test_task_executor.py", line 252, in test_task_executor_execute
    mock_action.run.return_value = dict(ansible_facts=dict())
  File "/home/mg/src/ansible/lib/ansible/executor/task_executor.py", line 317, in _execute
    if self._task.async > 0:
TypeError: unorderable types: MagicMock() > int()

----------------------------------------------------------------------

Experiments show that Python 2 MagicMock() > 0 is true, so I'm setting
the async property on mock_task to 1.  (If I set it to 0, the test fails
anyway.)
2015-09-07 09:49:28 +03:00
James Cammarata
b2cb3153f1 Fix unit tests for PlayIterator changes regarding fact gathering 2015-09-03 14:25:43 -04:00
James Cammarata
ccaf47bd97 Fix unit tests broken by 057712c1 2015-08-28 16:44:04 -04:00
James Cammarata
9891bcbcae Fix unit tests broken by previous commit 2015-08-04 12:40:13 -04:00
James Cammarata
993ce592b1 Update unit tests for flush_handlers fix 2015-07-22 11:30:05 -04:00
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
2015-07-21 12:13:50 -04:00
James Cammarata
3d77723e3d Cleaning up some stuff related to the connection info/become/executable change 2015-07-19 01:12:23 -04:00
Brian Coca
323362e23a added stdout to test result 2015-07-14 15:59:18 -04:00
Brian Coca
aa6486778f fixed become test to match new expected output 2015-07-06 15:34:38 -04:00
Brian Coca
5bac17de51 fixed pfexec test 2015-06-15 01:20:38 -04:00
Matt Martz
230be812ba Don't test for play.become_pass any longer 2015-06-06 09:25:30 -05:00
James Cammarata
d4a31e8d26 Adding unit tests for TaskExecutor (v2) 2015-05-24 07:47:06 -05:00
James Cammarata
838ff32001 Fix unit test for conn_info (v2)
The default user expected in the connection information is the current
user, not root
2015-05-22 08:38:39 -05:00
James Cammarata
ecd5eb902d Adding unit tests for ConnectionInformation (v2) 2015-05-22 03:32:40 -05:00
James Cammarata
1ca8cb8553 Fixing up v2 unit tests 2015-05-12 12:24:57 -05:00
Matt Martz
a0fc8bb0bd Testing additions and fixes
* Fix import pathing for units.mock
* Add some additional requirements
* Use compileall to test compatiblity with different python versions
2015-05-08 13:40:02 -05:00
James Cammarata
ce3ef7f4c1 Making the switch to v2 2015-05-03 21:47:26 -05:00