Commit Graph

2 Commits

Author SHA1 Message Date
George Robinson b676fc4d2e
Add tests for create and then update silences (#3899)
This commit adds a unit test for the postSilencesHandler to
create and then update a silence. It shows that changing the
ID of an existing silence returns 404 Not Found, and removing
the ID of an existing silence re-creates that silence with
a different ID.

Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-06-25 11:58:45 +01:00
gotjosh 512138d566
Refactor POST /api/v1/silences
As part of #2971, I'm about to extend the test for silences - extract the functions into helpers as part of a separate file and add names to the expectations so that we can easily identify them.

Signed-off-by: gotjosh <josue.abreu@gmail.com>
2022-07-06 18:34:57 +01:00