2024-01-29 22:33:45 +00:00
// Code generated by mockery v2.32.4. DO NOT EDIT.
2024-01-18 23:30:04 +00:00
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
}
2024-01-29 22:33:45 +00:00
// 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 {
2024-01-18 23:30:04 +00:00
mock . TestingT
Cleanup ( func ( ) )
2024-01-29 22:33:45 +00:00
} ) * mockDnsRecursor {
2024-01-18 23:30:04 +00:00
mock := & mockDnsRecursor { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}