Skip to content

Add tests for create and then update silences#3899

Merged
gotjosh merged 1 commit intoprometheus:mainfrom
grobinson-grafana:grobinson/add-tests-for-create-update-silences
Jun 25, 2024
Merged

Add tests for create and then update silences#3899
gotjosh merged 1 commit intoprometheus:mainfrom
grobinson-grafana:grobinson/add-tests-for-create-update-silences

Conversation

@grobinson-grafana
Copy link
Collaborator

@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 <george.robinson@grafana.com>
@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
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 <george.robinson@grafana.com>
@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 <george.robinson@grafana.com>
tjhop pushed a commit to tjhop/alertmanager that referenced this pull request Nov 13, 2025
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>
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