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:
Alan Rominger
2020-09-09 16:41:59 -04:00
parent a73323f3d6
commit 2e1f5cebb7
11 changed files with 63 additions and 38 deletions

View File

@@ -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"