milvus/internal/querynodev2/cluster/mock_manager.go

80 lines
2.0 KiB
Go

// Code generated by mockery v2.16.0. DO NOT EDIT.
package cluster
import mock "github.com/stretchr/testify/mock"
// MockManager is an autogenerated mock type for the Manager type
type MockManager struct {
mock.Mock
}
type MockManager_Expecter struct {
mock *mock.Mock
}
func (_m *MockManager) EXPECT() *MockManager_Expecter {
return &MockManager_Expecter{mock: &_m.Mock}
}
// GetWorker provides a mock function with given fields: nodeID
func (_m *MockManager) GetWorker(nodeID int64) (Worker, error) {
ret := _m.Called(nodeID)
var r0 Worker
if rf, ok := ret.Get(0).(func(int64) Worker); ok {
r0 = rf(nodeID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(Worker)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(int64) error); ok {
r1 = rf(nodeID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockManager_GetWorker_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWorker'
type MockManager_GetWorker_Call struct {
*mock.Call
}
// GetWorker is a helper method to define mock.On call
// - nodeID int64
func (_e *MockManager_Expecter) GetWorker(nodeID interface{}) *MockManager_GetWorker_Call {
return &MockManager_GetWorker_Call{Call: _e.mock.On("GetWorker", nodeID)}
}
func (_c *MockManager_GetWorker_Call) Run(run func(nodeID int64)) *MockManager_GetWorker_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(int64))
})
return _c
}
func (_c *MockManager_GetWorker_Call) Return(_a0 Worker, _a1 error) *MockManager_GetWorker_Call {
_c.Call.Return(_a0, _a1)
return _c
}
type mockConstructorTestingTNewMockManager interface {
mock.TestingT
Cleanup(func())
}
// NewMockManager creates a new instance of MockManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockManager(t mockConstructorTestingTNewMockManager) *MockManager {
mock := &MockManager{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}