1a1c9203e2
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.) |
||
---|---|---|
.. | ||
integration | ||
units | ||
README.md |
Ansible Test System
Folders
unit
Unit tests that test small pieces of code not suited for the integration test layer, usually very API based, and should leverage mock interfaces rather than producing side effects.
Playbook engine code is better suited for integration tests.
Requirements: sudo pip install paramiko PyYAML jinja2 httplib2 passlib nose mock
integration
Integration test layer, constructed using playbooks.
Some tests may require cloud credentials, others will not, and destructive tests are separated from non-destructive so a subset can be run on development machines.
learn more
hop into a subdirectory and see the associated README.md for more info.