Skip to content

Commit

Permalink
change parameter order and add indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
flkhndlr authored Apr 3, 2024
1 parent 0fc3c24 commit 987a496
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
1 change: 1 addition & 0 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ action_groups:
- grafana_plugin
- grafana_team
- grafana_user
- grafana_silence

Check failure on line 14 in meta/runtime.yml

View workflow job for this annotation

GitHub Actions / ansible

yaml[new-line-at-end-of-file]

No new line character at the end of file
16 changes: 8 additions & 8 deletions plugins/modules/grafana_silence.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@
starts_at: "2029-07-29T08:45:45.000Z"
ends_at: "2029-07-29T08:55:45.000Z"
matchers:
- isEqual: true
isRegex: true
name: environment
value: test
- isEqual: true
isRegex: true
name: environment
value: test
state: present
- name: Delete a silence
Expand All @@ -100,10 +100,10 @@
starts_at: "2029-07-29T08:45:45.000Z"
ends_at: "2029-07-29T08:55:45.000Z"
matchers:
- isEqual: true
isRegex: true
name: environment
value: test
- isEqual: true
isRegex: true
name: environment
value: test
state: absent
"""

Expand Down
5 changes: 5 additions & 0 deletions tests/integration/targets/grafana_silence/runme.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -eux

ansible-playbook site.yml
6 changes: 6 additions & 0 deletions tests/integration/targets/grafana_silence/site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- name: Run tests for grafana_team
hosts: localhost
tasks:
- ansible.builtin.include_role:
name: ../../grafana_silence
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ def test_create_silence_new_silence(self, mock_fetch_url, mock_get_version):
{
"comment": "a testcomment",
"created_by": "me",
"starts_at": "2029-07-29T08:45:45.000Z",
"ends_at": "2029-07-29T08:55:45.000Z",
"matchers": [
{
Expand All @@ -149,6 +148,7 @@ def test_create_silence_new_silence(self, mock_fetch_url, mock_get_version):
"value": "test",
}
],
"starts_at": "2029-07-29T08:45:45.000Z",
},
sort_keys=True,
),
Expand Down

0 comments on commit 987a496

Please sign in to comment.