Skip to content

Commit

Permalink
fixup! try run tests in check-mode, too
Browse files Browse the repository at this point in the history
  • Loading branch information
rndmh3ro committed Jan 4, 2024
1 parent 3690867 commit 1c20791
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
11 changes: 10 additions & 1 deletion tests/integration/targets/grafana_organization/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
url_password: "{{ grafana_password }}"
name: orgtest
state: present
register: result - "result.changed == true" - "result.failed == false" - "result.org.name == 'orgtest'"
register: result

- ansible.builtin.assert:
that:
- result.changed == true
- result.failed == false
- result.org.name == 'orgtest'
when: not ansible_check_mode

- name: Check idempotency Grafana organization
Expand All @@ -17,6 +23,7 @@
name: orgtest
state: present
register: result

- ansible.builtin.assert:
that:
- result.changed == false
Expand All @@ -32,6 +39,7 @@
name: orgtest
state: absent
register: result

- ansible.builtin.assert:
that:
- result.changed == true
Expand All @@ -47,6 +55,7 @@
name: orgtest
state: absent
register: result

- ansible.builtin.assert:
that:
- result.changed == false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@
role: admin
state: present
register: result
- ansible.builtin.assert:
when: not ansible_check_mode

- ansible.builtin.assert:
that:
- result.failed == false
Expand All @@ -125,6 +126,8 @@
login: orgtest
state: absent
register: result
when: not ansible_check_mode

- ansible.builtin.assert:
that:
- result.failed == false
Expand All @@ -141,6 +144,8 @@
role: admin
state: present
register: result
when: not ansible_check_mode

- ansible.builtin.assert:
that:
- result.failed == false
Expand All @@ -158,6 +163,8 @@
login: orgtest
state: absent
register: result
when: not ansible_check_mode

- ansible.builtin.assert:
that:
- result.failed == false
Expand Down

0 comments on commit 1c20791

Please sign in to comment.