Skip to content

Commit

Permalink
test: fix org name test
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemental committed Jun 27, 2024
1 parent aaa9e64 commit 2d1780d
Showing 1 changed file with 49 additions and 3 deletions.
52 changes: 49 additions & 3 deletions tests/integration/targets/grafana_folder/tasks/org.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,53 @@
---
- module_defaults:
community.grafana.grafana_folder:
org_name: Main Org.
url: "{{ grafana_url }}"
url_username: "{{ grafana_username }}"
url_password: "{{ grafana_password }}"
org_name: "Main Org."
block:
- name: Folder creation and deletion
ansible.builtin.include_tasks: create-delete.yml
- name: Create a Folder
community.grafana.grafana_folder:
title: grafana_working_group
state: present
register: result

- ansible.builtin.assert:
that:
- result.changed == true
- result.folder.title == 'grafana_working_group'
when: not ansible_check_mode

- name: Test folder creation idempotency
community.grafana.grafana_folder:
title: grafana_working_group
state: present
register: result

- ansible.builtin.assert:
that:
- result.changed == false
- result.folder.title == 'grafana_working_group'
when: not ansible_check_mode

- name: Delete a Folder
community.grafana.grafana_folder:
title: grafana_working_group
state: absent
register: result

- ansible.builtin.assert:
that:
- result.changed == true
when: not ansible_check_mode

- name: Test folder deletion idempotency
community.grafana.grafana_folder:
title: grafana_working_group
state: absent
register: result

- ansible.builtin.assert:
that:
- result.changed == false
when: not ansible_check_mode

0 comments on commit 2d1780d

Please sign in to comment.