Skip to content

Commit 4fe344d

Browse files
committed
test unreachable stats.
1 parent 02d7500 commit 4fe344d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/plugins/callback/idempotence.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ def playbook_on_stats(self, stats):
1616

1717
if (u'%s' % VAR_IDEMPOTENCE) in self.playbook.extra_vars.keys() and self.playbook.extra_vars[VAR_IDEMPOTENCE]:
1818

19+
if len(stats.unreachable) > 0:
20+
print ('idempotence test failed! unreachable=%s > 0') % stats.unreachable
21+
sys.exit(os.EX_SOFTWARE)
22+
1923
if len(stats.changed) > 0:
2024
print ('idempotence test failed! changed=%s > 0') % stats.changed
2125
sys.exit(os.EX_SOFTWARE)

0 commit comments

Comments
 (0)