Add task files to fake task test resources

It would otherwise yield tasks without files which shouldn't happen.

Change-Id: Ib49678ae24f3deba4ffd84e01522eb306de0b9b5
This commit is contained in:
David Moreau-Simard 2017-07-28 12:07:27 -04:00
parent 63e89ee174
commit 50a0fb9fcb
1 changed files with 6 additions and 2 deletions

View File

@ -109,7 +109,9 @@ def ansible_run(complete=True, failed=False, gather_facts=True,
record_task = fakes.Task(play=play,
playbook=playbook,
action='ara_record').model
action='ara_record',
file=task_file,
file_id=task_file.id).model
tasks.append(record_task)
ctx = dict(
@ -152,7 +154,9 @@ def ansible_run(complete=True, failed=False, gather_facts=True,
failed_task = fakes.Task(play=play,
playbook=playbook,
action='fail').model
action='fail',
file=task_file,
file_id=task_file.id).model
tasks.append(failed_task)
if failed:
msg = 'FAILED!'