Skip to content

Commit

Permalink
grafana_team does not support check mode
Browse files Browse the repository at this point in the history
  • Loading branch information
rndmh3ro committed Jan 4, 2024
1 parent 1c20791 commit 0d83d15
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/integration/targets/grafana_team/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- result.team.email == '[email protected]'
- result.team.memberCount == (expected_members|length)
- result.team.members == expected_members
when: not ansible_check_mode

- name: Check idempotency on team creation
community.grafana.grafana_team:
Expand All @@ -42,6 +43,7 @@
- result.team.email == '[email protected]'
- result.team.memberCount == (expected_members|length)
- result.team.members == expected_members
when: not ansible_check_mode

- name: Check a team can be deleted
community.grafana.grafana_team:
Expand All @@ -57,6 +59,7 @@
that:
- result.changed == true
- result.message == 'Team deleted'
when: not ansible_check_mode

- name: Check idempotency on team deletion
community.grafana.grafana_team:
Expand All @@ -72,10 +75,12 @@
that:
- result.changed == false
- result.message == 'No team found'
when: not ansible_check_mode

- name: Create users for tests purpose
ansible.builtin.import_tasks:
file: create_user.yml

- name: Create a Team with members
community.grafana.grafana_team:
url: "{{ grafana_url }}"
Expand All @@ -100,6 +105,7 @@
- result.team.email == '[email protected]'
- result.team.memberCount == (expected_members|length)
- result.team.members == expected_members
when: not ansible_check_mode

- name: Ensure a Team exists with member not enforced
community.grafana.grafana_team:
Expand All @@ -120,6 +126,7 @@
- result.team.email == '[email protected]'
- result.team.memberCount == (expected_members|length)
- result.team.members == expected_members
when: not ansible_check_mode

- ansible.builtin.set_fact:
enforced_members: "{{ auto_member | ternary(['admin@localhost', '[email protected]'], ['[email protected]']) }}"
Expand Down Expand Up @@ -162,6 +169,7 @@
- result.team.email == '[email protected]'
- result.team.memberCount == (expected_members|length)
- result.team.members == expected_members
when: not ansible_check_mode

- name: Add new member to existing Team
community.grafana.grafana_team:
Expand All @@ -186,3 +194,4 @@
- result.team.email == '[email protected]'
- result.team.memberCount == (expected_members|length)
- result.team.members == expected_members
when: not ansible_check_mode

0 comments on commit 0d83d15

Please sign in to comment.