mirror of
https://github.com/ansible/awx.git
synced 2026-01-20 22:18:01 -03:30
Fix the bulk Job Launch Integration test in awx collection (#14702)
* fix the integration tests
This commit is contained in:
parent
fb04e5d9f6
commit
87abbd4b10
@ -60,7 +60,7 @@
|
||||
- result['job_info']['skip_tags'] == "skipbaz"
|
||||
- result['job_info']['limit'] == "localhost"
|
||||
- result['job_info']['job_tags'] == "Hello World"
|
||||
- result['job_info']['inventory'] == {{ inventory_id }}
|
||||
- result['job_info']['inventory'] == inventory_id | int
|
||||
- "result['job_info']['extra_vars'] == '{\"animal\": \"bear\", \"food\": \"carrot\"}'"
|
||||
|
||||
# cleanup
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "{{ matching_jobs.count }} == 1"
|
||||
- matching_jobs.count == 1
|
||||
|
||||
- name: List failed jobs (which don't exist)
|
||||
job_list:
|
||||
@ -26,7 +26,7 @@
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "{{ successful_jobs.count }} == 0"
|
||||
- successful_jobs.count == 0
|
||||
|
||||
- name: Get ALL result pages!
|
||||
job_list:
|
||||
|
||||
@ -99,7 +99,7 @@
|
||||
that:
|
||||
- wait_results is failed
|
||||
- 'wait_results.status == "canceled"'
|
||||
- "wait_results.msg == 'Job with id {{ job.id }} failed' or 'Job with id={{ job.id }} failed, error: Job failed.'"
|
||||
- "'Job with id ~ job.id failed' or 'Job with id= ~ job.id failed, error: Job failed.' is in wait_results.msg"
|
||||
|
||||
# workflow wait test
|
||||
- name: Generate a random string for test
|
||||
|
||||
@ -132,7 +132,7 @@
|
||||
|
||||
- name: Get the ID of the first user created and verify that it is correct
|
||||
assert:
|
||||
that: "{{ query(plugin_name, 'users', query_params={ 'username' : user_creation_results['results'][0]['item'] }, return_ids=True)[0] }} == {{ user_creation_results['results'][0]['id'] }}"
|
||||
that: "query(plugin_name, 'users', query_params={ 'username' : user_creation_results['results'][0]['item'] }, return_ids=True)[0] == user_creation_results['results'][0]['id'] | string"
|
||||
|
||||
- name: Try to get an ID of someone who does not exist
|
||||
set_fact:
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
|
||||
- name: Call ruleset with no rules
|
||||
set_fact:
|
||||
complex_rule: "{{ query(ruleset_plugin_name, '2022-04-30 10:30:45') }}"
|
||||
complex_rule: "{{ query(ruleset_plugin_name | string, '2022-04-30 10:30:45') }}"
|
||||
ignore_errors: True
|
||||
register: results
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
- assert:
|
||||
that:
|
||||
- result is failed
|
||||
- "'Unable to create schedule {{ sched1 }}' in result.msg"
|
||||
- "'Unable to create schedule '~ sched1 in result.msg"
|
||||
|
||||
- name: Create with options that the JT does not support
|
||||
schedule:
|
||||
@ -62,7 +62,7 @@
|
||||
- assert:
|
||||
that:
|
||||
- result is failed
|
||||
- "'Unable to create schedule {{ sched1 }}' in result.msg"
|
||||
- "'Unable to create schedule '~ sched1 in result.msg"
|
||||
|
||||
- name: Build a real schedule
|
||||
schedule:
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
- name: Test too many params (failure from validation of terms)
|
||||
debug:
|
||||
msg: "{{ query(plugin_name, 'none', 'weekly', start_date='2020-4-16 03:45:07') }}"
|
||||
msg: "{{ query(plugin_name | string, 'none', 'weekly', start_date='2020-4-16 03:45:07') }}"
|
||||
ignore_errors: true
|
||||
register: result
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
- assert:
|
||||
that:
|
||||
- result is failed
|
||||
- "'Monitoring of Workflow Job - {{ wfjt_name1 }} aborted due to timeout' in result.msg"
|
||||
- "'Monitoring of Workflow Job - '~ wfjt_name1 ~ ' aborted due to timeout' in result.msg"
|
||||
|
||||
- name: Kick off a workflow and wait for it
|
||||
workflow_launch:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user