summaryrefslogtreecommitdiff
path: root/test/integration/targets/tower_team/tasks/main.yml
blob: 96fb921a815cc50d55969118e89902b5abba308f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
- 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:
      - "'The requested object could not be found.' in result.msg"

- name: Create a Tower team
  tower_team:
    name: Test Team
    organization: Default
  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"

- 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.'"