mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
pycharm refactor rename files and class, linux rename tower_ controller_
This commit is contained in:
57
awx_collection/tests/integration/targets/team/tasks/main.yml
Normal file
57
awx_collection/tests/integration/targets/team/tasks/main.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
- name: Generate names
|
||||
set_fact:
|
||||
team_name: "AWX-Collection-tests-tower_team-team-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
||||
|
||||
- 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: true
|
||||
|
||||
- name: Assert a meaningful error was provided for the failed Tower team creation
|
||||
assert:
|
||||
that:
|
||||
- "result is failed"
|
||||
- "result is not changed"
|
||||
- "'Missing_Organization' in result.msg"
|
||||
- "result.total_results == 0"
|
||||
|
||||
- name: Create a Tower team
|
||||
tower_team:
|
||||
name: "{{ team_name }}"
|
||||
organization: Default
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Delete a Tower team
|
||||
tower_team:
|
||||
name: "{{ team_name }}"
|
||||
organization: Default
|
||||
state: absent
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Check module fails with correct msg
|
||||
tower_team:
|
||||
name: "{{ team_name }}"
|
||||
organization: Non_Existing_Org
|
||||
state: present
|
||||
register: result
|
||||
ignore_errors: true
|
||||
|
||||
- name: Lookup of the related organization should cause a failure
|
||||
assert:
|
||||
that:
|
||||
- "result is failed"
|
||||
- "result is not changed"
|
||||
- "'Non_Existing_Org' in result.msg"
|
||||
- "result.total_results == 0"
|
||||
Reference in New Issue
Block a user