add real ip test

This commit is contained in:
fatedier
2021-06-21 19:27:26 +08:00
parent fe4e9b55f3
commit a51e221db3
6 changed files with 176 additions and 22 deletions

View File

@ -17,7 +17,11 @@ func SpecifiedHTTPBodyHandler(body []byte) http.HandlerFunc {
func ExpectResponseCode(code int) EnsureFunc {
return func(resp *request.Response) bool {
return resp.Code == code
if resp.Code == code {
return true
}
flog.Warn("Expect code %d, but got %d", code, resp.Code)
return false
}
}