Skip to content

Commit

Permalink
fix comment: add ut
Browse files Browse the repository at this point in the history
Signed-off-by: okJiang <[email protected]>
  • Loading branch information
okJiang committed May 23, 2024
1 parent 794c735 commit b123494
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/integrations/client/http_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -811,3 +811,22 @@ func (suite *httpClientTestSuite) checkUpdateKeyspaceGCManagementType(mode mode,
re.True(ok)
re.Equal(expectGCManagementType, val)
}

func (suite *httpClientTestSuite) TestGetHealthStatus() {
suite.RunTestInTwoModes(suite.checkGetHealthStatus)
}

func (suite *httpClientTestSuite) checkGetHealthStatus(mode mode, client pd.Client) {
re := suite.Require()
env := suite.env[mode]

healths, err := client.GetHealthStatus(env.ctx)
re.NoError(err)
re.Len(healths, 2)
sort.Slice(healths, func(i, j int) bool {
return healths[i].Name < healths[j].Name
})
re.Equal("pd1", healths[0].Name)
re.Equal("pd2", healths[1].Name)
re.Equal(true, healths[0].Health && healths[1].Health)
}

0 comments on commit b123494

Please sign in to comment.