mirror of https://github.com/status-im/consul.git
79 lines
3.0 KiB
Go
79 lines
3.0 KiB
Go
|
// Code generated by mockery v2.37.1. DO NOT EDIT.
|
||
|
|
||
|
package mockpbserverdiscovery
|
||
|
|
||
|
import (
|
||
|
pbserverdiscovery "github.com/hashicorp/consul/proto-public/pbserverdiscovery"
|
||
|
mock "github.com/stretchr/testify/mock"
|
||
|
)
|
||
|
|
||
|
// ServerDiscoveryServiceServer is an autogenerated mock type for the ServerDiscoveryServiceServer type
|
||
|
type ServerDiscoveryServiceServer struct {
|
||
|
mock.Mock
|
||
|
}
|
||
|
|
||
|
type ServerDiscoveryServiceServer_Expecter struct {
|
||
|
mock *mock.Mock
|
||
|
}
|
||
|
|
||
|
func (_m *ServerDiscoveryServiceServer) EXPECT() *ServerDiscoveryServiceServer_Expecter {
|
||
|
return &ServerDiscoveryServiceServer_Expecter{mock: &_m.Mock}
|
||
|
}
|
||
|
|
||
|
// WatchServers provides a mock function with given fields: _a0, _a1
|
||
|
func (_m *ServerDiscoveryServiceServer) WatchServers(_a0 *pbserverdiscovery.WatchServersRequest, _a1 pbserverdiscovery.ServerDiscoveryService_WatchServersServer) error {
|
||
|
ret := _m.Called(_a0, _a1)
|
||
|
|
||
|
var r0 error
|
||
|
if rf, ok := ret.Get(0).(func(*pbserverdiscovery.WatchServersRequest, pbserverdiscovery.ServerDiscoveryService_WatchServersServer) error); ok {
|
||
|
r0 = rf(_a0, _a1)
|
||
|
} else {
|
||
|
r0 = ret.Error(0)
|
||
|
}
|
||
|
|
||
|
return r0
|
||
|
}
|
||
|
|
||
|
// ServerDiscoveryServiceServer_WatchServers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchServers'
|
||
|
type ServerDiscoveryServiceServer_WatchServers_Call struct {
|
||
|
*mock.Call
|
||
|
}
|
||
|
|
||
|
// WatchServers is a helper method to define mock.On call
|
||
|
// - _a0 *pbserverdiscovery.WatchServersRequest
|
||
|
// - _a1 pbserverdiscovery.ServerDiscoveryService_WatchServersServer
|
||
|
func (_e *ServerDiscoveryServiceServer_Expecter) WatchServers(_a0 interface{}, _a1 interface{}) *ServerDiscoveryServiceServer_WatchServers_Call {
|
||
|
return &ServerDiscoveryServiceServer_WatchServers_Call{Call: _e.mock.On("WatchServers", _a0, _a1)}
|
||
|
}
|
||
|
|
||
|
func (_c *ServerDiscoveryServiceServer_WatchServers_Call) Run(run func(_a0 *pbserverdiscovery.WatchServersRequest, _a1 pbserverdiscovery.ServerDiscoveryService_WatchServersServer)) *ServerDiscoveryServiceServer_WatchServers_Call {
|
||
|
_c.Call.Run(func(args mock.Arguments) {
|
||
|
run(args[0].(*pbserverdiscovery.WatchServersRequest), args[1].(pbserverdiscovery.ServerDiscoveryService_WatchServersServer))
|
||
|
})
|
||
|
return _c
|
||
|
}
|
||
|
|
||
|
func (_c *ServerDiscoveryServiceServer_WatchServers_Call) Return(_a0 error) *ServerDiscoveryServiceServer_WatchServers_Call {
|
||
|
_c.Call.Return(_a0)
|
||
|
return _c
|
||
|
}
|
||
|
|
||
|
func (_c *ServerDiscoveryServiceServer_WatchServers_Call) RunAndReturn(run func(*pbserverdiscovery.WatchServersRequest, pbserverdiscovery.ServerDiscoveryService_WatchServersServer) error) *ServerDiscoveryServiceServer_WatchServers_Call {
|
||
|
_c.Call.Return(run)
|
||
|
return _c
|
||
|
}
|
||
|
|
||
|
// NewServerDiscoveryServiceServer creates a new instance of ServerDiscoveryServiceServer. 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 NewServerDiscoveryServiceServer(t interface {
|
||
|
mock.TestingT
|
||
|
Cleanup(func())
|
||
|
}) *ServerDiscoveryServiceServer {
|
||
|
mock := &ServerDiscoveryServiceServer{}
|
||
|
mock.Mock.Test(t)
|
||
|
|
||
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||
|
|
||
|
return mock
|
||
|
}
|