2022-12-13 20:09:55 +00:00
// Code generated by mockery v2.15.0. DO NOT EDIT.
package rate
import (
context "context"
mock "github.com/stretchr/testify/mock"
)
// MockRequestLimitsHandler is an autogenerated mock type for the RequestLimitsHandler type
type MockRequestLimitsHandler struct {
mock . Mock
}
// Allow provides a mock function with given fields: op
func ( _m * MockRequestLimitsHandler ) Allow ( op Operation ) error {
ret := _m . Called ( op )
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( Operation ) error ) ; ok {
r0 = rf ( op )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// Run provides a mock function with given fields: ctx
func ( _m * MockRequestLimitsHandler ) Run ( ctx context . Context ) {
_m . Called ( ctx )
}
// UpdateConfig provides a mock function with given fields: cfg
func ( _m * MockRequestLimitsHandler ) UpdateConfig ( cfg HandlerConfig ) {
_m . Called ( cfg )
}
2023-01-04 19:38:44 +00:00
// Register provides a mock function with given fields: leaderStatusProvider
func ( _m * MockRequestLimitsHandler ) Register ( leaderStatusProvider LeaderStatusProvider ) {
_m . Called ( leaderStatusProvider )
}
2022-12-13 20:09:55 +00:00
type mockConstructorTestingTNewMockRequestLimitsHandler interface {
mock . TestingT
Cleanup ( func ( ) )
}
// NewMockRequestLimitsHandler creates a new instance of MockRequestLimitsHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockRequestLimitsHandler ( t mockConstructorTestingTNewMockRequestLimitsHandler ) * MockRequestLimitsHandler {
mock := & MockRequestLimitsHandler { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}