Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
Signed-off-by: bufferflies <[email protected]>
  • Loading branch information
bufferflies authored and ti-chi-bot committed Jul 12, 2023
1 parent 2b38121 commit ef9bcdf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/server/api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,15 @@ func (suite *middlewareTestSuite) TestRateLimitMiddleware() {
}
}

func (suite *middlewareTestSuite) TestSwaggerUrl() {
leader := suite.cluster.GetServer(suite.cluster.GetLeader())
req, _ := http.NewRequest(http.MethodGet, leader.GetAddr()+"/swagger/ui/index", nil)
resp, err := dialClient.Do(req)
suite.NoError(err)
suite.True(resp.StatusCode == http.StatusNotFound)
resp.Body.Close()
}

func (suite *middlewareTestSuite) TestAuditPrometheusBackend() {
leader := suite.cluster.GetServer(suite.cluster.GetLeader())
input := map[string]interface{}{
Expand Down

0 comments on commit ef9bcdf

Please sign in to comment.