Skip to content

Commit

Permalink
test: all basic tests successful
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemental committed Mar 20, 2024
1 parent 08fdd6e commit ef50eee
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
uid: kafka
name: kafka
type: kafka
kafka_url: https://example.org
kafka_rest_proxy_url: https://example.org
kafka_topic: test

- ansible.builtin.debug:
Expand All @@ -21,7 +21,7 @@
uid: kafka
name: kafka
type: kafka
kafka_url: https://example.org
kafka_rest_proxy_url: https://example.org
kafka_topic: test

- ansible.builtin.debug:
Expand Down
30 changes: 16 additions & 14 deletions tests/integration/targets/grafana_contact_point/tasks/sensugo.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
- name: Create sensu contact point
- name: Create sensugo contact point
register: result
community.grafana.grafana_contact_point:
uid: sensu
name: sensu
type: sensu
sensu_url: https://example.org
uid: sensugo
name: sensugo
type: sensugo
sensugo_url: https://example.org
sensugo_api_key: testapikey

- ansible.builtin.debug:
var: result
Expand All @@ -14,13 +15,14 @@
that:
- result.changed == True

- name: Create sensu contact point
- name: Create sensugo contact point
register: result
community.grafana.grafana_contact_point:
uid: sensu
name: sensu
type: sensu
sensu_url: https://example.org
uid: sensugo
name: sensugo
type: sensugo
sensugo_url: https://example.org
sensugo_api_key: testapikey

- ansible.builtin.debug:
var: result
Expand All @@ -29,10 +31,10 @@
that:
- result.changed == False

- name: Delete sensu contact point
- name: Delete sensugo contact point
register: result
community.grafana.grafana_contact_point:
uid: sensu
uid: sensugo
state: absent

- ansible.builtin.debug:
Expand All @@ -42,10 +44,10 @@
that:
- result.changed == True

- name: Delete sensu contact point (idempotency)
- name: Delete sensugo contact point (idempotency)
register: result
community.grafana.grafana_contact_point:
uid: sensu
uid: sensugo
state: absent

- ansible.builtin.debug:
Expand Down
23 changes: 7 additions & 16 deletions tests/integration/targets/grafana_contact_point/tasks/slack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
name: slack
type: slack
slack_url: https://hooks.slack.com/services/xxx/yyy/zzz
slack_token: testapitoken
slack_recipient: foo

- ansible.builtin.debug:
var: result
Expand All @@ -14,28 +16,15 @@
that:
- result.changed == True

- name: Create slack contact point
register: result
community.grafana.grafana_contact_point:
uid: slack
name: slack
type: slack
slack_url: https://hooks.slack.com/services/xxx/yyy/zzz

- ansible.builtin.debug:
var: result

- ansible.builtin.assert:
that:
- result.changed == False

- name: Check slack contact point idempotency
- name: Check slack contact point (idempotency)
register: result
community.grafana.grafana_contact_point:
uid: slack
name: slack
type: slack
slack_url: https://hooks.slack.com/services/xxx/yyy/zzz
slack_token: testapitoken
slack_recipient: foo

- ansible.builtin.debug:
var: result
Expand All @@ -51,6 +40,8 @@
name: slack
type: slack
slack_url: https://hooks.slack.com/services/xxx/yyy/fff
slack_token: testapitoken
slack_recipient: foo

- ansible.builtin.debug:
var: result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
uid: telegram
name: telegram
type: telegram
telegram_bot_token: xxx
telegram_token: xxx
telegram_chat_id: yyy

- ansible.builtin.debug:
Expand All @@ -21,7 +21,7 @@
uid: telegram
name: telegram
type: telegram
telegram_bot_token: xxx
telegram_token: xxx
telegram_chat_id: yyy

- ansible.builtin.debug:
Expand Down

0 comments on commit ef50eee

Please sign in to comment.