ansible/test
James Cammarata 0871d955fe Reworking iterator logic regarding failed states during always
Previous changes addressed a corner case, which unfortunately introduced
another bug. This patch adds a new flag to the host state (did_rescue) which
is set to true when the rescue portion of a block completes. This flag is
then checked in _check_failed_state() when the fail_state != FAILED_NONE.

This lead to the discovery of another bug - current strategies are not advancing
hosts to ITERATING_COMPLETE after doing a peek at the next task, leaving the
host state in the run_state of the final task. To address this, before gathering
the list of failed hosts in StrategyBase.run(), a final pass through the iterator
for all hosts is done to ensure each host is in its final state. This way, no
strategy derived from StrategyBase has to worry about it and it's handled.

Fixes #17983

(cherry picked from commit ca5b361ad8)
2016-11-18 11:09:36 -06:00
..
code-smell Add a whitelist for checking for six. Use it for digital_ocean.py 2016-10-06 11:00:26 -07:00
integration Alternately track listening handlers by uuid if no name is set 2016-11-13 15:28:38 -06:00
samples Changes to be committed: (#16430) 2016-06-24 10:26:51 -04:00
sanity/validate-modules Port validate-modules to stable-2.2 (#18119) 2016-10-20 18:22:58 +01:00
units Reworking iterator logic regarding failed states during always 2016-11-18 11:09:36 -06:00
utils Enable the git test on py3 2016-10-21 09:07:18 -07:00
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.