2018-03-16 18:28:19 +01:00
|
|
|
- name: Attempt to add a Tower team to a non-existant Organization
|
|
|
|
tower_team:
|
|
|
|
name: Test Team
|
|
|
|
organization: Missing Organization
|
|
|
|
state: present
|
|
|
|
register: result
|
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- name: Assert a meaningful error was provided for the failed Tower team creation
|
|
|
|
assert:
|
|
|
|
that:
|
2019-01-09 15:31:21 +01:00
|
|
|
- "'The requested object could not be found.' in result.msg"
|
2018-03-16 18:28:19 +01:00
|
|
|
|
2018-03-03 01:32:38 +01:00
|
|
|
- name: Create a Tower team
|
|
|
|
tower_team:
|
|
|
|
name: Test Team
|
|
|
|
organization: Default
|
2018-03-16 18:28:19 +01:00
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result is changed"
|
|
|
|
|
|
|
|
- name: Delete a Tower team
|
|
|
|
tower_team:
|
|
|
|
name: Test Team
|
|
|
|
organization: Default
|
|
|
|
state: absent
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result is changed"
|
2019-01-09 15:31:21 +01:00
|
|
|
|
|
|
|
- name: Check module fails with correct msg
|
|
|
|
tower_team:
|
|
|
|
name: Test Team
|
|
|
|
organization: Non Existing Org
|
|
|
|
state: present
|
|
|
|
register: result
|
|
|
|
ignore_errors: true
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.msg =='Failed to update team, organization not found: The requested object could not be found.'"
|