Skip to content

Commit 130b81c

Browse files
committed
remove v1 AM apis test
Signed-off-by: alanprot <alanprot@gmail.com>
1 parent f5328df commit 130b81c

File tree

2 files changed

+1
-31
lines changed

2 files changed

+1
-31
lines changed

pkg/alertmanager/distributor_test.go

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,6 @@ func TestDistributor_DistributeRequest(t *testing.T) {
8585
expStatusCode: http.StatusInternalServerError,
8686
expectedTotalCalls: 3,
8787
route: "/alerts",
88-
}, {
89-
name: "Read /v1/alerts is sent to 3 AMs",
90-
numAM: 5,
91-
numHappyAM: 5,
92-
replicationFactor: 3,
93-
isRead: true,
94-
expStatusCode: http.StatusOK,
95-
expectedTotalCalls: 3,
96-
route: "/v1/alerts",
97-
responseBody: []byte(`{"status":"success","data":[]}`),
9888
}, {
9989
name: "Read /v2/alerts is sent to 3 AMs",
10090
numAM: 5,
@@ -133,16 +123,6 @@ func TestDistributor_DistributeRequest(t *testing.T) {
133123
expectedTotalCalls: 0,
134124
headersNotPreserved: true,
135125
route: "/alerts/groups",
136-
}, {
137-
name: "Read /v1/silences is sent to 3 AMs",
138-
numAM: 5,
139-
numHappyAM: 5,
140-
replicationFactor: 3,
141-
isRead: true,
142-
expStatusCode: http.StatusOK,
143-
expectedTotalCalls: 3,
144-
route: "/v1/silences",
145-
responseBody: []byte(`{"status":"success","data":[]}`),
146126
}, {
147127
name: "Read /v2/silences is sent to 3 AMs",
148128
numAM: 5,
@@ -161,16 +141,6 @@ func TestDistributor_DistributeRequest(t *testing.T) {
161141
expStatusCode: http.StatusOK,
162142
expectedTotalCalls: 1,
163143
route: "/silences",
164-
}, {
165-
name: "Read /v1/silence/id is sent to 3 AMs",
166-
numAM: 5,
167-
numHappyAM: 5,
168-
replicationFactor: 3,
169-
isRead: true,
170-
expStatusCode: http.StatusOK,
171-
expectedTotalCalls: 3,
172-
route: "/v1/silence/id",
173-
responseBody: []byte(`{"status":"success","data":{"id":"aaa","updatedAt":"2020-01-01T00:00:00Z"}}`),
174144
}, {
175145
name: "Read /v2/silence/id is sent to 3 AMs",
176146
numAM: 5,

pkg/alertmanager/multitenant_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ receivers:
529529
require.NoError(t, err)
530530

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

0 commit comments

Comments
 (0)