Merge pull request #13976 from john-westcott-iv/collection_job_wait_remove_depreciated_field_check

Change the job_wait integration test
This commit is contained in:
John Westcott IV
2023-05-11 08:29:50 -04:00
committed by GitHub

View File

@@ -9,7 +9,8 @@
jt_name: "AWX-Collection-tests-job_wait-long_running-{{ test_id }}"
proj_name: "AWX-Collection-tests-job_wait-long_running-{{ test_id }}"
- name: Assure that the demo project exists
- block:
- name: Create a project
project:
name: "{{ proj_name }}"
scm_type: 'git'
@@ -25,21 +26,7 @@
project: "{{ proj_name }}"
inventory: "Demo Inventory"
extra_vars:
sleep_interval: 300
- name: Validate that interval superceeds min/max
job_wait:
min_interval: 10
max_interval: 20
interval: 12
job_id: "99999999"
register: result
ignore_errors: true
- assert:
that:
- "result.msg =='Unable to wait on job 99999999; that ID does not exist.' or
'min and max interval have been depricated, please use interval instead, interval will be set to 12'"
sleep_interval: 600
- name: Check module fails with correct msg
job_wait:
@@ -114,21 +101,6 @@
- 'wait_results.status == "canceled"'
- "wait_results.msg == 'Job with id {{ job.id }} failed' or 'Job with id={{ job.id }} failed, error: Job failed.'"
- name: Delete the job template
job_template:
name: "{{ jt_name }}"
playbook: "sleep.yml"
job_type: run
project: "{{ proj_name }}"
inventory: "Demo Inventory"
state: absent
- name: Delete the project
project:
name: "{{ proj_name }}"
organization: Default
state: absent
# workflow wait test
- name: Generate a random string for test
set_fact:
@@ -170,7 +142,23 @@
- "'elapsed' in wait_workflow_results"
- "'id' in wait_workflow_results"
always:
- name: Clean up test workflow
workflow_job_template:
name: "{{ wfjt_name2 }}"
state: absent
- name: Delete the job template
job_template:
name: "{{ jt_name }}"
playbook: "sleep.yml"
job_type: run
project: "{{ proj_name }}"
inventory: "Demo Inventory"
state: absent
- name: Delete the project
project:
name: "{{ proj_name }}"
organization: Default
state: absent