Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the Integration tests in awx collection #14702

Merged
merged 6 commits into from Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -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
Expand Down
Expand Up @@ -16,7 +16,7 @@

- assert:
that:
- "{{ matching_jobs.count }} == 1"
- matching_jobs.count == 1

- name: List failed jobs (which don't exist)
job_list:
Expand All @@ -26,7 +26,7 @@

- assert:
that:
- "{{ successful_jobs.count }} == 0"
- successful_jobs.count == 0

- name: Get ALL result pages!
job_list:
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -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:
Expand Down
Expand Up @@ -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

Expand Down
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
Expand Up @@ -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

Expand Down
Expand Up @@ -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:
Expand Down