mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-18 14:21:06 -07:00
Update unit tests for flush_handlers fix
This commit is contained in:
parent
4b6525fb58
commit
993ce592b1
2 changed files with 29 additions and 9 deletions
|
@ -77,19 +77,37 @@ class TestPlayIterator(unittest.TestCase):
|
|||
all_vars=dict(),
|
||||
)
|
||||
|
||||
# pre task
|
||||
(host_state, task) = itr.get_next_task_for_host(hosts[0])
|
||||
print(task)
|
||||
self.assertIsNotNone(task)
|
||||
self.assertEqual(task.action, 'debug')
|
||||
# implicit meta: flush_handlers
|
||||
(host_state, task) = itr.get_next_task_for_host(hosts[0])
|
||||
print(task)
|
||||
self.assertIsNotNone(task)
|
||||
self.assertEqual(task.action, 'meta')
|
||||
# role task
|
||||
(host_state, task) = itr.get_next_task_for_host(hosts[0])
|
||||
print(task)
|
||||
self.assertIsNotNone(task)
|
||||
self.assertEqual(task.action, 'debug')
|
||||
self.assertIsNotNone(task._role)
|
||||
# regular play task
|
||||
(host_state, task) = itr.get_next_task_for_host(hosts[0])
|
||||
print(task)
|
||||
self.assertIsNotNone(task)
|
||||
self.assertEqual(task.action, 'debug')
|
||||
self.assertIsNone(task._role)
|
||||
# implicit meta: flush_handlers
|
||||
(host_state, task) = itr.get_next_task_for_host(hosts[0])
|
||||
self.assertIsNotNone(task)
|
||||
self.assertEqual(task.action, 'meta')
|
||||
# post task
|
||||
(host_state, task) = itr.get_next_task_for_host(hosts[0])
|
||||
self.assertIsNotNone(task)
|
||||
self.assertEqual(task.action, 'debug')
|
||||
# implicit meta: flush_handlers
|
||||
(host_state, task) = itr.get_next_task_for_host(hosts[0])
|
||||
self.assertIsNotNone(task)
|
||||
self.assertEqual(task.action, 'meta')
|
||||
# end of iteration
|
||||
(host_state, task) = itr.get_next_task_for_host(hosts[0])
|
||||
print(task)
|
||||
self.assertIsNone(task)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue