Skip to content

Commit

Permalink
remove v1 AM apis test
Browse files Browse the repository at this point in the history
Signed-off-by: alanprot <alanprot@gmail.com>
  • Loading branch information
alanprot committed Apr 2, 2024
1 parent f5328df commit 130b81c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 31 deletions.
30 changes: 0 additions & 30 deletions pkg/alertmanager/distributor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,6 @@ func TestDistributor_DistributeRequest(t *testing.T) {
expStatusCode: http.StatusInternalServerError,
expectedTotalCalls: 3,
route: "/alerts",
}, {
name: "Read /v1/alerts is sent to 3 AMs",
numAM: 5,
numHappyAM: 5,
replicationFactor: 3,
isRead: true,
expStatusCode: http.StatusOK,
expectedTotalCalls: 3,
route: "/v1/alerts",
responseBody: []byte(`{"status":"success","data":[]}`),
}, {
name: "Read /v2/alerts is sent to 3 AMs",
numAM: 5,
Expand Down Expand Up @@ -133,16 +123,6 @@ func TestDistributor_DistributeRequest(t *testing.T) {
expectedTotalCalls: 0,
headersNotPreserved: true,
route: "/alerts/groups",
}, {
name: "Read /v1/silences is sent to 3 AMs",
numAM: 5,
numHappyAM: 5,
replicationFactor: 3,
isRead: true,
expStatusCode: http.StatusOK,
expectedTotalCalls: 3,
route: "/v1/silences",
responseBody: []byte(`{"status":"success","data":[]}`),
}, {
name: "Read /v2/silences is sent to 3 AMs",
numAM: 5,
Expand All @@ -161,16 +141,6 @@ func TestDistributor_DistributeRequest(t *testing.T) {
expStatusCode: http.StatusOK,
expectedTotalCalls: 1,
route: "/silences",
}, {
name: "Read /v1/silence/id is sent to 3 AMs",
numAM: 5,
numHappyAM: 5,
replicationFactor: 3,
isRead: true,
expStatusCode: http.StatusOK,
expectedTotalCalls: 3,
route: "/v1/silence/id",
responseBody: []byte(`{"status":"success","data":{"id":"aaa","updatedAt":"2020-01-01T00:00:00Z"}}`),
}, {
name: "Read /v2/silence/id is sent to 3 AMs",
numAM: 5,
Expand Down
2 changes: 1 addition & 1 deletion pkg/alertmanager/multitenant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ receivers:
require.NoError(t, err)

// Push an alert.
req := httptest.NewRequest(http.MethodPost, cfg.ExternalURL.String()+"/api/v1/alerts", bytes.NewReader(alertsPayload))
req := httptest.NewRequest(http.MethodPost, cfg.ExternalURL.String()+"/api/v2/alerts", bytes.NewReader(alertsPayload))
req.Header.Set("content-type", "application/json")
reqCtx := user.InjectOrgID(req.Context(), userID)
{
Expand Down

0 comments on commit 130b81c

Please sign in to comment.