diff --git a/client/http/interface.go b/client/http/interface.go index 7b15291d9e7..75c858df19f 100644 --- a/client/http/interface.go +++ b/client/http/interface.go @@ -672,7 +672,7 @@ func (c *client) GetRegionLabelRulesByIDs(ctx context.Context, ruleIDs []string) var labelRules []*LabelRule err = c.request(ctx, newRequestInfo(). WithName(getRegionLabelRulesByIDsName). - WithURI(RegionLabelRules). + WithURI(RegionLabelRulesByIDs). WithMethod(http.MethodGet). WithBody(idsJSON). WithResp(&labelRules)) diff --git a/tests/integrations/client/http_client_test.go b/tests/integrations/client/http_client_test.go index 9efbc587847..94c3194f3e9 100644 --- a/tests/integrations/client/http_client_test.go +++ b/tests/integrations/client/http_client_test.go @@ -451,7 +451,15 @@ func (suite *httpClientTestSuite) checkRegionLabel(mode mode, client pd.Client) re.Equal(labelRule.ID, allLabelRules[1].ID) re.Equal(labelRule.Labels, allLabelRules[1].Labels) re.Equal(labelRule.RuleType, allLabelRules[1].RuleType) +<<<<<<< HEAD labelRules, err = client.GetRegionLabelRulesByIDs(env.ctx, []string{"keyspaces/0", "rule2"}) +======= + labelRules, err = client.GetRegionLabelRulesByIDs(ctx, []string{"rule2"}) + re.NoError(err) + re.Len(labelRules, 1) + re.Equal(labelRule, labelRules[0]) + labelRules, err = client.GetRegionLabelRulesByIDs(ctx, []string{"keyspaces/0", "rule2"}) +>>>>>>> 838ee7983 (client/http: fix the URI of GetRegionLabelRulesByIDs (#8490)) re.NoError(err) sort.Slice(labelRules, func(i, j int) bool { return labelRules[i].ID < labelRules[j].ID