mirror of
https://github.com/ansible/awx.git
synced 2026-05-14 12:57:40 -02:30
Further refine error message and update integration tests
Fix test with spaces pep8 failure More test tweaks Even more test fixes
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
- name: Attempt to add a Tower team to a non-existant Organization
|
||||
tower_team:
|
||||
name: Test Team
|
||||
organization: Missing Organization
|
||||
organization: Missing_Organization
|
||||
state: present
|
||||
register: result
|
||||
ignore_errors: true
|
||||
@@ -14,9 +14,10 @@
|
||||
- name: Assert a meaningful error was provided for the failed Tower team creation
|
||||
assert:
|
||||
that:
|
||||
- result is failed
|
||||
- "result.msg =='Failed to update team, organization not found: The requested object could not be found.' or
|
||||
result.msg =='The organizations Missing Organization was not found on the Tower server'"
|
||||
- "result is failed"
|
||||
- "result is not changed"
|
||||
- "'Missing_Organization' in result.msg"
|
||||
- "result.total_results == 0"
|
||||
|
||||
- name: Create a Tower team
|
||||
tower_team:
|
||||
@@ -42,12 +43,15 @@
|
||||
- name: Check module fails with correct msg
|
||||
tower_team:
|
||||
name: "{{ team_name }}"
|
||||
organization: Non Existing Org
|
||||
organization: Non_Existing_Org
|
||||
state: present
|
||||
register: result
|
||||
ignore_errors: true
|
||||
|
||||
- assert:
|
||||
- name: Lookup of the related organization should cause a failure
|
||||
assert:
|
||||
that:
|
||||
- "result.msg =='Failed to update team, organization not found: The requested object could not be found.' or
|
||||
result.msg =='The organizations Non Existing Org was not found on the Tower server'"
|
||||
- "result is failed"
|
||||
- "result is not changed"
|
||||
- "'Non_Existing_Org' in result.msg"
|
||||
- "result.total_results == 0"
|
||||
|
||||
Reference in New Issue
Block a user