mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
* MM-16543 Add mocking for einterfaces packages * MM-16543 Fix Elasticsearch only returning one page of results * Remove license checks for einterface mocks
191 lines
4.6 KiB
Go
191 lines
4.6 KiB
Go
// Code generated by mockery v1.0.0. DO NOT EDIT.
|
|
|
|
// Regenerate this file using `make einterfaces-mocks`.
|
|
|
|
package mocks
|
|
|
|
import einterfaces "github.com/mattermost/mattermost-server/einterfaces"
|
|
import mock "github.com/stretchr/testify/mock"
|
|
import model "github.com/mattermost/mattermost-server/model"
|
|
|
|
// ClusterInterface is an autogenerated mock type for the ClusterInterface type
|
|
type ClusterInterface struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// ConfigChanged provides a mock function with given fields: previousConfig, newConfig, sendToOtherServer
|
|
func (_m *ClusterInterface) ConfigChanged(previousConfig *model.Config, newConfig *model.Config, sendToOtherServer bool) *model.AppError {
|
|
ret := _m.Called(previousConfig, newConfig, sendToOtherServer)
|
|
|
|
var r0 *model.AppError
|
|
if rf, ok := ret.Get(0).(func(*model.Config, *model.Config, bool) *model.AppError); ok {
|
|
r0 = rf(previousConfig, newConfig, sendToOtherServer)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GetClusterId provides a mock function with given fields:
|
|
func (_m *ClusterInterface) GetClusterId() string {
|
|
ret := _m.Called()
|
|
|
|
var r0 string
|
|
if rf, ok := ret.Get(0).(func() string); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GetClusterInfos provides a mock function with given fields:
|
|
func (_m *ClusterInterface) GetClusterInfos() []*model.ClusterInfo {
|
|
ret := _m.Called()
|
|
|
|
var r0 []*model.ClusterInfo
|
|
if rf, ok := ret.Get(0).(func() []*model.ClusterInfo); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.ClusterInfo)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GetClusterStats provides a mock function with given fields:
|
|
func (_m *ClusterInterface) GetClusterStats() ([]*model.ClusterStats, *model.AppError) {
|
|
ret := _m.Called()
|
|
|
|
var r0 []*model.ClusterStats
|
|
if rf, ok := ret.Get(0).(func() []*model.ClusterStats); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.ClusterStats)
|
|
}
|
|
}
|
|
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(1).(func() *model.AppError); ok {
|
|
r1 = rf()
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetLogs provides a mock function with given fields: page, perPage
|
|
func (_m *ClusterInterface) GetLogs(page int, perPage int) ([]string, *model.AppError) {
|
|
ret := _m.Called(page, perPage)
|
|
|
|
var r0 []string
|
|
if rf, ok := ret.Get(0).(func(int, int) []string); ok {
|
|
r0 = rf(page, perPage)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(1).(func(int, int) *model.AppError); ok {
|
|
r1 = rf(page, perPage)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetMyClusterInfo provides a mock function with given fields:
|
|
func (_m *ClusterInterface) GetMyClusterInfo() *model.ClusterInfo {
|
|
ret := _m.Called()
|
|
|
|
var r0 *model.ClusterInfo
|
|
if rf, ok := ret.Get(0).(func() *model.ClusterInfo); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.ClusterInfo)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GetPluginStatuses provides a mock function with given fields:
|
|
func (_m *ClusterInterface) GetPluginStatuses() (model.PluginStatuses, *model.AppError) {
|
|
ret := _m.Called()
|
|
|
|
var r0 model.PluginStatuses
|
|
if rf, ok := ret.Get(0).(func() model.PluginStatuses); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(model.PluginStatuses)
|
|
}
|
|
}
|
|
|
|
var r1 *model.AppError
|
|
if rf, ok := ret.Get(1).(func() *model.AppError); ok {
|
|
r1 = rf()
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(*model.AppError)
|
|
}
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// IsLeader provides a mock function with given fields:
|
|
func (_m *ClusterInterface) IsLeader() bool {
|
|
ret := _m.Called()
|
|
|
|
var r0 bool
|
|
if rf, ok := ret.Get(0).(func() bool); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(bool)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// NotifyMsg provides a mock function with given fields: buf
|
|
func (_m *ClusterInterface) NotifyMsg(buf []byte) {
|
|
_m.Called(buf)
|
|
}
|
|
|
|
// RegisterClusterMessageHandler provides a mock function with given fields: event, crm
|
|
func (_m *ClusterInterface) RegisterClusterMessageHandler(event string, crm einterfaces.ClusterMessageHandler) {
|
|
_m.Called(event, crm)
|
|
}
|
|
|
|
// SendClusterMessage provides a mock function with given fields: cluster
|
|
func (_m *ClusterInterface) SendClusterMessage(cluster *model.ClusterMessage) {
|
|
_m.Called(cluster)
|
|
}
|
|
|
|
// StartInterNodeCommunication provides a mock function with given fields:
|
|
func (_m *ClusterInterface) StartInterNodeCommunication() {
|
|
_m.Called()
|
|
}
|
|
|
|
// StopInterNodeCommunication provides a mock function with given fields:
|
|
func (_m *ClusterInterface) StopInterNodeCommunication() {
|
|
_m.Called()
|
|
}
|