Add exception to allow relaunching callback jobs

allows for execute_role level users to directly
relaunch callback-type jobs, even though limit
has changed from JT, it is a down-selection
This commit is contained in:
AlanCoding
2018-05-11 09:05:25 -04:00
parent 46add35f98
commit db6cc7c50b
5 changed files with 22 additions and 7 deletions

View File

@@ -75,7 +75,7 @@ def test_job_relaunch_on_failed_hosts(post, inventory, project, machine_credenti
project=project
)
jt.credentials.add(machine_credential)
job = jt.create_unified_job(_eager_fields={'status': 'failed', 'limit': 'host1,host2,host3'})
job = jt.create_unified_job(_eager_fields={'status': 'failed'}, limit='host1,host2,host3')
job.job_events.create(event='playbook_on_stats')
job.job_host_summaries.create(host=h1, failed=False, ok=1, changed=0, failures=0, host_name=h1.name)
job.job_host_summaries.create(host=h2, failed=False, ok=0, changed=1, failures=0, host_name=h2.name)