mirror of https://github.com/status-im/consul.git
56 lines
1.5 KiB
Go
56 lines
1.5 KiB
Go
// Code generated by mockery v2.32.4. DO NOT EDIT.
|
|
|
|
package dns
|
|
|
|
import (
|
|
miekgdns "github.com/miekg/dns"
|
|
mock "github.com/stretchr/testify/mock"
|
|
|
|
net "net"
|
|
)
|
|
|
|
// mockDnsRecursor is an autogenerated mock type for the dnsRecursor type
|
|
type mockDnsRecursor struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// handle provides a mock function with given fields: req, cfgCtx, remoteAddr
|
|
func (_m *mockDnsRecursor) handle(req *miekgdns.Msg, cfgCtx *RouterDynamicConfig, remoteAddr net.Addr) (*miekgdns.Msg, error) {
|
|
ret := _m.Called(req, cfgCtx, remoteAddr)
|
|
|
|
var r0 *miekgdns.Msg
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(*miekgdns.Msg, *RouterDynamicConfig, net.Addr) (*miekgdns.Msg, error)); ok {
|
|
return rf(req, cfgCtx, remoteAddr)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(*miekgdns.Msg, *RouterDynamicConfig, net.Addr) *miekgdns.Msg); ok {
|
|
r0 = rf(req, cfgCtx, remoteAddr)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*miekgdns.Msg)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(*miekgdns.Msg, *RouterDynamicConfig, net.Addr) error); ok {
|
|
r1 = rf(req, cfgCtx, remoteAddr)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// newMockDnsRecursor creates a new instance of mockDnsRecursor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
// The first argument is typically a *testing.T value.
|
|
func newMockDnsRecursor(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *mockDnsRecursor {
|
|
mock := &mockDnsRecursor{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|