mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-25 20:29:56 +00:00
Replace self defined const StatusTooManyRequests with http.StatusTooManyRequests.
This commit is contained in:
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package eventratelimit
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -516,7 +517,7 @@ func TestEventRateLimiting(t *testing.T) {
|
||||
}
|
||||
if err != nil {
|
||||
statusErr, ok := err.(*errors.StatusError)
|
||||
if ok && statusErr.ErrStatus.Code != errors.StatusTooManyRequests {
|
||||
if ok && statusErr.ErrStatus.Code != http.StatusTooManyRequests {
|
||||
t.Fatalf("%v: Request %v should yield a 429 response: %v", tc.name, rqIndex, err)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user