Skip to content

Commit

Permalink
linting and sixing pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
flkhndlr committed Apr 3, 2024
1 parent 987a496 commit d8b52ef
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion plugins/modules/grafana_silence.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ def create_silence(self, comment, created_by, starts_at, ends_at, matchers):
silence = dict(
comment=comment,
createdBy=created_by,
startsAt=starts_at,
endsAt=ends_at,
matchers=matchers,
startsAt=starts_at,
)
response = self._send_request(
url, data=silence, headers=self.headers, method="POST"
Expand Down
Empty file modified tests/integration/targets/grafana_silence/runme.sh
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions tests/integration/targets/grafana_silence/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
tasks:
- ansible.builtin.include_role:
name: ../../grafana_silence

Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,21 @@ def silence_created_resp():
)
return (MockedReponse(server_response), {"status": 200})


def silence_get_resp():
server_response = json.dumps(
[], sort_keys=True
)
server_response = json.dumps([], sort_keys=True)
return (MockedReponse(server_response), {"status": 200})


def get_silence_by_id_resp():
server_response = json.dumps(
[], sort_keys=True
)
server_response = json.dumps([], sort_keys=True)
return (MockedReponse(server_response), {"status": 200})


def get_version_resp():
return {"major": 10, "minor": 0, "rev": 0}


class GrafanaSilenceTest(TestCase):
def setUp(self):
self.authorization = basic_auth_header("admin", "changeme")
Expand Down

0 comments on commit d8b52ef

Please sign in to comment.