Skip to content

Commit

Permalink
This is an automated cherry-pick of tikv#8490
Browse files Browse the repository at this point in the history
close tikv#8491, ref pingcap/tidb#55188

Signed-off-by: ti-chi-bot <[email protected]>
  • Loading branch information
JmPotato authored and ti-chi-bot committed Aug 5, 2024
1 parent 85258b3 commit 456fa93
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion client/http/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
8 changes: 8 additions & 0 deletions tests/integrations/client/http_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check failure on line 454 in tests/integrations/client/http_client_test.go

View workflow job for this annotation

GitHub Actions / statics

expected statement, found '<<'
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))

Check failure on line 462 in tests/integrations/client/http_client_test.go

View workflow job for this annotation

GitHub Actions / statics

exponent has no digits

Check failure on line 462 in tests/integrations/client/http_client_test.go

View workflow job for this annotation

GitHub Actions / statics

illegal character U+0023 '#'
re.NoError(err)
sort.Slice(labelRules, func(i, j int) bool {
return labelRules[i].ID < labelRules[j].ID
Expand Down

0 comments on commit 456fa93

Please sign in to comment.