Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for create and then update silences #3899

Conversation

grobinson-grafana
Copy link
Contributor

@grobinson-grafana grobinson-grafana commented Jun 25, 2024

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.

@grobinson-grafana grobinson-grafana force-pushed the grobinson/add-tests-for-create-update-silences branch 2 times, most recently from 7e95b75 to 2fb0437 Compare June 25, 2024 10:49
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 <[email protected]>
@grobinson-grafana grobinson-grafana force-pushed the grobinson/add-tests-for-create-update-silences branch from 2fb0437 to 1d5d71d Compare June 25, 2024 10:51
Copy link
Member

@gotjosh gotjosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gotjosh gotjosh merged commit b676fc4 into prometheus:main Jun 25, 2024
11 checks passed
grobinson-grafana added a commit to grobinson-grafana/alertmanager that referenced this pull request Jun 25, 2024
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 <[email protected]>
@grobinson-grafana grobinson-grafana deleted the grobinson/add-tests-for-create-update-silences branch June 25, 2024 15:59
TheMeier pushed a commit to TheMeier/alertmanager that referenced this pull request Sep 29, 2024
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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants