Revert "MM-57759: Bump mockery to version 2.42.2 to support go 1.22^" (#26772)

Этот коммит содержится в:
Agniva De Sarker
2024-04-12 19:01:24 +05:30
коммит произвёл GitHub
родитель c76a58b4b8
Коммит cd3b5b46e1
84 изменённых файлов: 504 добавлений и 5378 удалений

Просмотреть файл

@@ -1,4 +1,4 @@
// Code generated by mockery v2.42.2. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make searchengine-mocks`.
@@ -21,10 +21,6 @@ type SearchEngineInterface struct {
func (_m *SearchEngineInterface) DataRetentionDeleteIndexes(rctx request.CTX, cutoff time.Time) *model.AppError {
ret := _m.Called(rctx, cutoff)
if len(ret) == 0 {
panic("no return value specified for DataRetentionDeleteIndexes")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, time.Time) *model.AppError); ok {
r0 = rf(rctx, cutoff)
@@ -41,10 +37,6 @@ func (_m *SearchEngineInterface) DataRetentionDeleteIndexes(rctx request.CTX, cu
func (_m *SearchEngineInterface) DeleteChannel(channel *model.Channel) *model.AppError {
ret := _m.Called(channel)
if len(ret) == 0 {
panic("no return value specified for DeleteChannel")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(*model.Channel) *model.AppError); ok {
r0 = rf(channel)
@@ -61,10 +53,6 @@ func (_m *SearchEngineInterface) DeleteChannel(channel *model.Channel) *model.Ap
func (_m *SearchEngineInterface) DeleteChannelPosts(rctx request.CTX, channelID string) *model.AppError {
ret := _m.Called(rctx, channelID)
if len(ret) == 0 {
panic("no return value specified for DeleteChannelPosts")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string) *model.AppError); ok {
r0 = rf(rctx, channelID)
@@ -81,10 +69,6 @@ func (_m *SearchEngineInterface) DeleteChannelPosts(rctx request.CTX, channelID
func (_m *SearchEngineInterface) DeleteFile(fileID string) *model.AppError {
ret := _m.Called(fileID)
if len(ret) == 0 {
panic("no return value specified for DeleteFile")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
r0 = rf(fileID)
@@ -101,10 +85,6 @@ func (_m *SearchEngineInterface) DeleteFile(fileID string) *model.AppError {
func (_m *SearchEngineInterface) DeleteFilesBatch(rctx request.CTX, endTime int64, limit int64) *model.AppError {
ret := _m.Called(rctx, endTime, limit)
if len(ret) == 0 {
panic("no return value specified for DeleteFilesBatch")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, int64, int64) *model.AppError); ok {
r0 = rf(rctx, endTime, limit)
@@ -121,10 +101,6 @@ func (_m *SearchEngineInterface) DeleteFilesBatch(rctx request.CTX, endTime int6
func (_m *SearchEngineInterface) DeletePost(post *model.Post) *model.AppError {
ret := _m.Called(post)
if len(ret) == 0 {
panic("no return value specified for DeletePost")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(*model.Post) *model.AppError); ok {
r0 = rf(post)
@@ -141,10 +117,6 @@ func (_m *SearchEngineInterface) DeletePost(post *model.Post) *model.AppError {
func (_m *SearchEngineInterface) DeletePostFiles(rctx request.CTX, postID string) *model.AppError {
ret := _m.Called(rctx, postID)
if len(ret) == 0 {
panic("no return value specified for DeletePostFiles")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string) *model.AppError); ok {
r0 = rf(rctx, postID)
@@ -161,10 +133,6 @@ func (_m *SearchEngineInterface) DeletePostFiles(rctx request.CTX, postID string
func (_m *SearchEngineInterface) DeleteUser(user *model.User) *model.AppError {
ret := _m.Called(user)
if len(ret) == 0 {
panic("no return value specified for DeleteUser")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(*model.User) *model.AppError); ok {
r0 = rf(user)
@@ -181,10 +149,6 @@ func (_m *SearchEngineInterface) DeleteUser(user *model.User) *model.AppError {
func (_m *SearchEngineInterface) DeleteUserFiles(rctx request.CTX, userID string) *model.AppError {
ret := _m.Called(rctx, userID)
if len(ret) == 0 {
panic("no return value specified for DeleteUserFiles")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string) *model.AppError); ok {
r0 = rf(rctx, userID)
@@ -201,10 +165,6 @@ func (_m *SearchEngineInterface) DeleteUserFiles(rctx request.CTX, userID string
func (_m *SearchEngineInterface) DeleteUserPosts(rctx request.CTX, userID string) *model.AppError {
ret := _m.Called(rctx, userID)
if len(ret) == 0 {
panic("no return value specified for DeleteUserPosts")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string) *model.AppError); ok {
r0 = rf(rctx, userID)
@@ -221,10 +181,6 @@ func (_m *SearchEngineInterface) DeleteUserPosts(rctx request.CTX, userID string
func (_m *SearchEngineInterface) GetFullVersion() string {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetFullVersion")
}
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
@@ -239,10 +195,6 @@ func (_m *SearchEngineInterface) GetFullVersion() string {
func (_m *SearchEngineInterface) GetName() string {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetName")
}
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
@@ -257,10 +209,6 @@ func (_m *SearchEngineInterface) GetName() string {
func (_m *SearchEngineInterface) GetPlugins() []string {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetPlugins")
}
var r0 []string
if rf, ok := ret.Get(0).(func() []string); ok {
r0 = rf()
@@ -277,10 +225,6 @@ func (_m *SearchEngineInterface) GetPlugins() []string {
func (_m *SearchEngineInterface) GetVersion() int {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetVersion")
}
var r0 int
if rf, ok := ret.Get(0).(func() int); ok {
r0 = rf()
@@ -295,10 +239,6 @@ func (_m *SearchEngineInterface) GetVersion() int {
func (_m *SearchEngineInterface) IndexChannel(rctx request.CTX, channel *model.Channel, userIDs []string, teamMemberIDs []string) *model.AppError {
ret := _m.Called(rctx, channel, userIDs, teamMemberIDs)
if len(ret) == 0 {
panic("no return value specified for IndexChannel")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, *model.Channel, []string, []string) *model.AppError); ok {
r0 = rf(rctx, channel, userIDs, teamMemberIDs)
@@ -315,10 +255,6 @@ func (_m *SearchEngineInterface) IndexChannel(rctx request.CTX, channel *model.C
func (_m *SearchEngineInterface) IndexFile(file *model.FileInfo, channelId string) *model.AppError {
ret := _m.Called(file, channelId)
if len(ret) == 0 {
panic("no return value specified for IndexFile")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(*model.FileInfo, string) *model.AppError); ok {
r0 = rf(file, channelId)
@@ -335,10 +271,6 @@ func (_m *SearchEngineInterface) IndexFile(file *model.FileInfo, channelId strin
func (_m *SearchEngineInterface) IndexPost(post *model.Post, teamId string) *model.AppError {
ret := _m.Called(post, teamId)
if len(ret) == 0 {
panic("no return value specified for IndexPost")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(*model.Post, string) *model.AppError); ok {
r0 = rf(post, teamId)
@@ -355,10 +287,6 @@ func (_m *SearchEngineInterface) IndexPost(post *model.Post, teamId string) *mod
func (_m *SearchEngineInterface) IndexUser(rctx request.CTX, user *model.User, teamsIds []string, channelsIds []string) *model.AppError {
ret := _m.Called(rctx, user, teamsIds, channelsIds)
if len(ret) == 0 {
panic("no return value specified for IndexUser")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, *model.User, []string, []string) *model.AppError); ok {
r0 = rf(rctx, user, teamsIds, channelsIds)
@@ -375,10 +303,6 @@ func (_m *SearchEngineInterface) IndexUser(rctx request.CTX, user *model.User, t
func (_m *SearchEngineInterface) IsActive() bool {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for IsActive")
}
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
@@ -393,10 +317,6 @@ func (_m *SearchEngineInterface) IsActive() bool {
func (_m *SearchEngineInterface) IsAutocompletionEnabled() bool {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for IsAutocompletionEnabled")
}
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
@@ -411,10 +331,6 @@ func (_m *SearchEngineInterface) IsAutocompletionEnabled() bool {
func (_m *SearchEngineInterface) IsChannelsIndexVerified() bool {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for IsChannelsIndexVerified")
}
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
@@ -429,10 +345,6 @@ func (_m *SearchEngineInterface) IsChannelsIndexVerified() bool {
func (_m *SearchEngineInterface) IsEnabled() bool {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for IsEnabled")
}
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
@@ -447,10 +359,6 @@ func (_m *SearchEngineInterface) IsEnabled() bool {
func (_m *SearchEngineInterface) IsIndexingEnabled() bool {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for IsIndexingEnabled")
}
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
@@ -465,10 +373,6 @@ func (_m *SearchEngineInterface) IsIndexingEnabled() bool {
func (_m *SearchEngineInterface) IsIndexingSync() bool {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for IsIndexingSync")
}
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
@@ -483,10 +387,6 @@ func (_m *SearchEngineInterface) IsIndexingSync() bool {
func (_m *SearchEngineInterface) IsSearchEnabled() bool {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for IsSearchEnabled")
}
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
@@ -501,10 +401,6 @@ func (_m *SearchEngineInterface) IsSearchEnabled() bool {
func (_m *SearchEngineInterface) PurgeIndexList(rctx request.CTX, indexes []string) *model.AppError {
ret := _m.Called(rctx, indexes)
if len(ret) == 0 {
panic("no return value specified for PurgeIndexList")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, []string) *model.AppError); ok {
r0 = rf(rctx, indexes)
@@ -521,10 +417,6 @@ func (_m *SearchEngineInterface) PurgeIndexList(rctx request.CTX, indexes []stri
func (_m *SearchEngineInterface) PurgeIndexes(rctx request.CTX) *model.AppError {
ret := _m.Called(rctx)
if len(ret) == 0 {
panic("no return value specified for PurgeIndexes")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX) *model.AppError); ok {
r0 = rf(rctx)
@@ -541,10 +433,6 @@ func (_m *SearchEngineInterface) PurgeIndexes(rctx request.CTX) *model.AppError
func (_m *SearchEngineInterface) RefreshIndexes(rctx request.CTX) *model.AppError {
ret := _m.Called(rctx)
if len(ret) == 0 {
panic("no return value specified for RefreshIndexes")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX) *model.AppError); ok {
r0 = rf(rctx)
@@ -561,10 +449,6 @@ func (_m *SearchEngineInterface) RefreshIndexes(rctx request.CTX) *model.AppErro
func (_m *SearchEngineInterface) SearchChannels(teamId string, userID string, term string, isGuest bool) ([]string, *model.AppError) {
ret := _m.Called(teamId, userID, term, isGuest)
if len(ret) == 0 {
panic("no return value specified for SearchChannels")
}
var r0 []string
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, string, string, bool) ([]string, *model.AppError)); ok {
@@ -593,10 +477,6 @@ func (_m *SearchEngineInterface) SearchChannels(teamId string, userID string, te
func (_m *SearchEngineInterface) SearchFiles(channels model.ChannelList, searchParams []*model.SearchParams, page int, perPage int) ([]string, *model.AppError) {
ret := _m.Called(channels, searchParams, page, perPage)
if len(ret) == 0 {
panic("no return value specified for SearchFiles")
}
var r0 []string
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(model.ChannelList, []*model.SearchParams, int, int) ([]string, *model.AppError)); ok {
@@ -625,10 +505,6 @@ func (_m *SearchEngineInterface) SearchFiles(channels model.ChannelList, searchP
func (_m *SearchEngineInterface) SearchPosts(channels model.ChannelList, searchParams []*model.SearchParams, page int, perPage int) ([]string, model.PostSearchMatches, *model.AppError) {
ret := _m.Called(channels, searchParams, page, perPage)
if len(ret) == 0 {
panic("no return value specified for SearchPosts")
}
var r0 []string
var r1 model.PostSearchMatches
var r2 *model.AppError
@@ -666,10 +542,6 @@ func (_m *SearchEngineInterface) SearchPosts(channels model.ChannelList, searchP
func (_m *SearchEngineInterface) SearchUsersInChannel(teamId string, channelId string, restrictedToChannels []string, term string, options *model.UserSearchOptions) ([]string, []string, *model.AppError) {
ret := _m.Called(teamId, channelId, restrictedToChannels, term, options)
if len(ret) == 0 {
panic("no return value specified for SearchUsersInChannel")
}
var r0 []string
var r1 []string
var r2 *model.AppError
@@ -707,10 +579,6 @@ func (_m *SearchEngineInterface) SearchUsersInChannel(teamId string, channelId s
func (_m *SearchEngineInterface) SearchUsersInTeam(teamId string, restrictedToChannels []string, term string, options *model.UserSearchOptions) ([]string, *model.AppError) {
ret := _m.Called(teamId, restrictedToChannels, term, options)
if len(ret) == 0 {
panic("no return value specified for SearchUsersInTeam")
}
var r0 []string
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, []string, string, *model.UserSearchOptions) ([]string, *model.AppError)); ok {
@@ -739,10 +607,6 @@ func (_m *SearchEngineInterface) SearchUsersInTeam(teamId string, restrictedToCh
func (_m *SearchEngineInterface) Start() *model.AppError {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Start")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func() *model.AppError); ok {
r0 = rf()
@@ -759,10 +623,6 @@ func (_m *SearchEngineInterface) Start() *model.AppError {
func (_m *SearchEngineInterface) Stop() *model.AppError {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Stop")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func() *model.AppError); ok {
r0 = rf()
@@ -779,10 +639,6 @@ func (_m *SearchEngineInterface) Stop() *model.AppError {
func (_m *SearchEngineInterface) TestConfig(rctx request.CTX, cfg *model.Config) *model.AppError {
ret := _m.Called(rctx, cfg)
if len(ret) == 0 {
panic("no return value specified for TestConfig")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, *model.Config) *model.AppError); ok {
r0 = rf(rctx, cfg)
@@ -800,12 +656,13 @@ func (_m *SearchEngineInterface) UpdateConfig(cfg *model.Config) {
_m.Called(cfg)
}
// NewSearchEngineInterface creates a new instance of SearchEngineInterface. 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 NewSearchEngineInterface(t interface {
type mockConstructorTestingTNewSearchEngineInterface interface {
mock.TestingT
Cleanup(func())
}) *SearchEngineInterface {
}
// NewSearchEngineInterface creates a new instance of SearchEngineInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewSearchEngineInterface(t mockConstructorTestingTNewSearchEngineInterface) *SearchEngineInterface {
mock := &SearchEngineInterface{}
mock.Mock.Test(t)

Просмотреть файл

@@ -1,4 +1,4 @@
// Code generated by mockery v2.42.2. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make sharedchannel-mocks`.
@@ -22,10 +22,6 @@ type MockAppIface struct {
func (_m *MockAppIface) AddUserToChannel(c request.CTX, user *model.User, channel *model.Channel, skipTeamMemberIntegrityCheck bool) (*model.ChannelMember, *model.AppError) {
ret := _m.Called(c, user, channel, skipTeamMemberIntegrityCheck)
if len(ret) == 0 {
panic("no return value specified for AddUserToChannel")
}
var r0 *model.ChannelMember
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, *model.User, *model.Channel, bool) (*model.ChannelMember, *model.AppError)); ok {
@@ -54,10 +50,6 @@ func (_m *MockAppIface) AddUserToChannel(c request.CTX, user *model.User, channe
func (_m *MockAppIface) AddUserToTeamByTeamId(c request.CTX, teamId string, user *model.User) *model.AppError {
ret := _m.Called(c, teamId, user)
if len(ret) == 0 {
panic("no return value specified for AddUserToTeamByTeamId")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string, *model.User) *model.AppError); ok {
r0 = rf(c, teamId, user)
@@ -74,10 +66,6 @@ func (_m *MockAppIface) AddUserToTeamByTeamId(c request.CTX, teamId string, user
func (_m *MockAppIface) CreateChannelWithUser(c request.CTX, channel *model.Channel, userId string) (*model.Channel, *model.AppError) {
ret := _m.Called(c, channel, userId)
if len(ret) == 0 {
panic("no return value specified for CreateChannelWithUser")
}
var r0 *model.Channel
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, *model.Channel, string) (*model.Channel, *model.AppError)); ok {
@@ -106,10 +94,6 @@ func (_m *MockAppIface) CreateChannelWithUser(c request.CTX, channel *model.Chan
func (_m *MockAppIface) CreatePost(c request.CTX, post *model.Post, channel *model.Channel, triggerWebhooks bool, setOnline bool) (*model.Post, *model.AppError) {
ret := _m.Called(c, post, channel, triggerWebhooks, setOnline)
if len(ret) == 0 {
panic("no return value specified for CreatePost")
}
var r0 *model.Post
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, *model.Post, *model.Channel, bool, bool) (*model.Post, *model.AppError)); ok {
@@ -138,10 +122,6 @@ func (_m *MockAppIface) CreatePost(c request.CTX, post *model.Post, channel *mod
func (_m *MockAppIface) CreateUploadSession(c request.CTX, us *model.UploadSession) (*model.UploadSession, *model.AppError) {
ret := _m.Called(c, us)
if len(ret) == 0 {
panic("no return value specified for CreateUploadSession")
}
var r0 *model.UploadSession
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, *model.UploadSession) (*model.UploadSession, *model.AppError)); ok {
@@ -170,10 +150,6 @@ func (_m *MockAppIface) CreateUploadSession(c request.CTX, us *model.UploadSessi
func (_m *MockAppIface) DeletePost(c request.CTX, postID string, deleteByID string) (*model.Post, *model.AppError) {
ret := _m.Called(c, postID, deleteByID)
if len(ret) == 0 {
panic("no return value specified for DeletePost")
}
var r0 *model.Post
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string, string) (*model.Post, *model.AppError)); ok {
@@ -202,10 +178,6 @@ func (_m *MockAppIface) DeletePost(c request.CTX, postID string, deleteByID stri
func (_m *MockAppIface) DeleteReactionForPost(c request.CTX, reaction *model.Reaction) *model.AppError {
ret := _m.Called(c, reaction)
if len(ret) == 0 {
panic("no return value specified for DeleteReactionForPost")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, *model.Reaction) *model.AppError); ok {
r0 = rf(c, reaction)
@@ -222,10 +194,6 @@ func (_m *MockAppIface) DeleteReactionForPost(c request.CTX, reaction *model.Rea
func (_m *MockAppIface) FileReader(path string) (filestore.ReadCloseSeeker, *model.AppError) {
ret := _m.Called(path)
if len(ret) == 0 {
panic("no return value specified for FileReader")
}
var r0 filestore.ReadCloseSeeker
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string) (filestore.ReadCloseSeeker, *model.AppError)); ok {
@@ -261,10 +229,6 @@ func (_m *MockAppIface) GetOrCreateDirectChannel(c request.CTX, userId string, o
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for GetOrCreateDirectChannel")
}
var r0 *model.Channel
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string, string, ...model.ChannelOption) (*model.Channel, *model.AppError)); ok {
@@ -293,10 +257,6 @@ func (_m *MockAppIface) GetOrCreateDirectChannel(c request.CTX, userId string, o
func (_m *MockAppIface) GetProfileImage(user *model.User) ([]byte, bool, *model.AppError) {
ret := _m.Called(user)
if len(ret) == 0 {
panic("no return value specified for GetProfileImage")
}
var r0 []byte
var r1 bool
var r2 *model.AppError
@@ -332,10 +292,6 @@ func (_m *MockAppIface) GetProfileImage(user *model.User) ([]byte, bool, *model.
func (_m *MockAppIface) MentionsToTeamMembers(c request.CTX, message string, teamID string) model.UserMentionMap {
ret := _m.Called(c, message, teamID)
if len(ret) == 0 {
panic("no return value specified for MentionsToTeamMembers")
}
var r0 model.UserMentionMap
if rf, ok := ret.Get(0).(func(request.CTX, string, string) model.UserMentionMap); ok {
r0 = rf(c, message, teamID)
@@ -357,10 +313,6 @@ func (_m *MockAppIface) NotifySharedChannelUserUpdate(user *model.User) {
func (_m *MockAppIface) OnSharedChannelsAttachmentSyncMsg(fi *model.FileInfo, post *model.Post, rc *model.RemoteCluster) error {
ret := _m.Called(fi, post, rc)
if len(ret) == 0 {
panic("no return value specified for OnSharedChannelsAttachmentSyncMsg")
}
var r0 error
if rf, ok := ret.Get(0).(func(*model.FileInfo, *model.Post, *model.RemoteCluster) error); ok {
r0 = rf(fi, post, rc)
@@ -375,10 +327,6 @@ func (_m *MockAppIface) OnSharedChannelsAttachmentSyncMsg(fi *model.FileInfo, po
func (_m *MockAppIface) OnSharedChannelsProfileImageSyncMsg(user *model.User, rc *model.RemoteCluster) error {
ret := _m.Called(user, rc)
if len(ret) == 0 {
panic("no return value specified for OnSharedChannelsProfileImageSyncMsg")
}
var r0 error
if rf, ok := ret.Get(0).(func(*model.User, *model.RemoteCluster) error); ok {
r0 = rf(user, rc)
@@ -393,10 +341,6 @@ func (_m *MockAppIface) OnSharedChannelsProfileImageSyncMsg(user *model.User, rc
func (_m *MockAppIface) OnSharedChannelsSyncMsg(msg *model.SyncMsg, rc *model.RemoteCluster) (model.SyncResponse, error) {
ret := _m.Called(msg, rc)
if len(ret) == 0 {
panic("no return value specified for OnSharedChannelsSyncMsg")
}
var r0 model.SyncResponse
var r1 error
if rf, ok := ret.Get(0).(func(*model.SyncMsg, *model.RemoteCluster) (model.SyncResponse, error)); ok {
@@ -421,10 +365,6 @@ func (_m *MockAppIface) OnSharedChannelsSyncMsg(msg *model.SyncMsg, rc *model.Re
func (_m *MockAppIface) PatchChannelModerationsForChannel(c request.CTX, channel *model.Channel, channelModerationsPatch []*model.ChannelModerationPatch) ([]*model.ChannelModeration, *model.AppError) {
ret := _m.Called(c, channel, channelModerationsPatch)
if len(ret) == 0 {
panic("no return value specified for PatchChannelModerationsForChannel")
}
var r0 []*model.ChannelModeration
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, *model.Channel, []*model.ChannelModerationPatch) ([]*model.ChannelModeration, *model.AppError)); ok {
@@ -453,10 +393,6 @@ func (_m *MockAppIface) PatchChannelModerationsForChannel(c request.CTX, channel
func (_m *MockAppIface) PermanentDeleteChannel(c request.CTX, channel *model.Channel) *model.AppError {
ret := _m.Called(c, channel)
if len(ret) == 0 {
panic("no return value specified for PermanentDeleteChannel")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, *model.Channel) *model.AppError); ok {
r0 = rf(c, channel)
@@ -478,10 +414,6 @@ func (_m *MockAppIface) Publish(message *model.WebSocketEvent) {
func (_m *MockAppIface) SaveReactionForPost(c request.CTX, reaction *model.Reaction) (*model.Reaction, *model.AppError) {
ret := _m.Called(c, reaction)
if len(ret) == 0 {
panic("no return value specified for SaveReactionForPost")
}
var r0 *model.Reaction
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, *model.Reaction) (*model.Reaction, *model.AppError)); ok {
@@ -510,10 +442,6 @@ func (_m *MockAppIface) SaveReactionForPost(c request.CTX, reaction *model.React
func (_m *MockAppIface) SendEphemeralPost(c request.CTX, userId string, post *model.Post) *model.Post {
ret := _m.Called(c, userId, post)
if len(ret) == 0 {
panic("no return value specified for SendEphemeralPost")
}
var r0 *model.Post
if rf, ok := ret.Get(0).(func(request.CTX, string, *model.Post) *model.Post); ok {
r0 = rf(c, userId, post)
@@ -530,10 +458,6 @@ func (_m *MockAppIface) SendEphemeralPost(c request.CTX, userId string, post *mo
func (_m *MockAppIface) UpdatePost(c request.CTX, post *model.Post, safeUpdate bool) (*model.Post, *model.AppError) {
ret := _m.Called(c, post, safeUpdate)
if len(ret) == 0 {
panic("no return value specified for UpdatePost")
}
var r0 *model.Post
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, *model.Post, bool) (*model.Post, *model.AppError)); ok {
@@ -558,12 +482,13 @@ func (_m *MockAppIface) UpdatePost(c request.CTX, post *model.Post, safeUpdate b
return r0, r1
}
// NewMockAppIface creates a new instance of MockAppIface. 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 NewMockAppIface(t interface {
type mockConstructorTestingTNewMockAppIface interface {
mock.TestingT
Cleanup(func())
}) *MockAppIface {
}
// NewMockAppIface creates a new instance of MockAppIface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockAppIface(t mockConstructorTestingTNewMockAppIface) *MockAppIface {
mock := &MockAppIface{}
mock.Mock.Test(t)

Просмотреть файл

@@ -1,4 +1,4 @@
// Code generated by mockery v2.42.2. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make sharedchannel-mocks`.
@@ -26,10 +26,6 @@ type MockServerIface struct {
func (_m *MockServerIface) AddClusterLeaderChangedListener(listener func()) string {
ret := _m.Called(listener)
if len(ret) == 0 {
panic("no return value specified for AddClusterLeaderChangedListener")
}
var r0 string
if rf, ok := ret.Get(0).(func(func()) string); ok {
r0 = rf(listener)
@@ -44,10 +40,6 @@ func (_m *MockServerIface) AddClusterLeaderChangedListener(listener func()) stri
func (_m *MockServerIface) Config() *model.Config {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Config")
}
var r0 *model.Config
if rf, ok := ret.Get(0).(func() *model.Config); ok {
r0 = rf()
@@ -64,10 +56,6 @@ func (_m *MockServerIface) Config() *model.Config {
func (_m *MockServerIface) GetMetrics() einterfaces.MetricsInterface {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetMetrics")
}
var r0 einterfaces.MetricsInterface
if rf, ok := ret.Get(0).(func() einterfaces.MetricsInterface); ok {
r0 = rf()
@@ -84,10 +72,6 @@ func (_m *MockServerIface) GetMetrics() einterfaces.MetricsInterface {
func (_m *MockServerIface) GetRemoteClusterService() remotecluster.RemoteClusterServiceIFace {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetRemoteClusterService")
}
var r0 remotecluster.RemoteClusterServiceIFace
if rf, ok := ret.Get(0).(func() remotecluster.RemoteClusterServiceIFace); ok {
r0 = rf()
@@ -104,10 +88,6 @@ func (_m *MockServerIface) GetRemoteClusterService() remotecluster.RemoteCluster
func (_m *MockServerIface) GetStore() store.Store {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetStore")
}
var r0 store.Store
if rf, ok := ret.Get(0).(func() store.Store); ok {
r0 = rf()
@@ -124,10 +104,6 @@ func (_m *MockServerIface) GetStore() store.Store {
func (_m *MockServerIface) IsLeader() bool {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for IsLeader")
}
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
@@ -142,10 +118,6 @@ func (_m *MockServerIface) IsLeader() bool {
func (_m *MockServerIface) Log() *mlog.Logger {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Log")
}
var r0 *mlog.Logger
if rf, ok := ret.Get(0).(func() *mlog.Logger); ok {
r0 = rf()
@@ -163,12 +135,13 @@ func (_m *MockServerIface) RemoveClusterLeaderChangedListener(id string) {
_m.Called(id)
}
// NewMockServerIface creates a new instance of MockServerIface. 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 NewMockServerIface(t interface {
type mockConstructorTestingTNewMockServerIface interface {
mock.TestingT
Cleanup(func())
}) *MockServerIface {
}
// NewMockServerIface creates a new instance of MockServerIface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockServerIface(t mockConstructorTestingTNewMockServerIface) *MockServerIface {
mock := &MockServerIface{}
mock.Mock.Test(t)

Просмотреть файл

@@ -1,4 +1,4 @@
// Code generated by mockery v2.42.2. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make telemetry-mocks`.
@@ -24,10 +24,6 @@ type ServerIface struct {
func (_m *ServerIface) Config() *model.Config {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Config")
}
var r0 *model.Config
if rf, ok := ret.Get(0).(func() *model.Config); ok {
r0 = rf()
@@ -44,10 +40,6 @@ func (_m *ServerIface) Config() *model.Config {
func (_m *ServerIface) GetPluginsEnvironment() *plugin.Environment {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetPluginsEnvironment")
}
var r0 *plugin.Environment
if rf, ok := ret.Get(0).(func() *plugin.Environment); ok {
r0 = rf()
@@ -64,10 +56,6 @@ func (_m *ServerIface) GetPluginsEnvironment() *plugin.Environment {
func (_m *ServerIface) GetRoleByName(_a0 context.Context, _a1 string) (*model.Role, *model.AppError) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for GetRoleByName")
}
var r0 *model.Role
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(context.Context, string) (*model.Role, *model.AppError)); ok {
@@ -96,10 +84,6 @@ func (_m *ServerIface) GetRoleByName(_a0 context.Context, _a1 string) (*model.Ro
func (_m *ServerIface) GetSchemes(_a0 string, _a1 int, _a2 int) ([]*model.Scheme, *model.AppError) {
ret := _m.Called(_a0, _a1, _a2)
if len(ret) == 0 {
panic("no return value specified for GetSchemes")
}
var r0 []*model.Scheme
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.Scheme, *model.AppError)); ok {
@@ -128,10 +112,6 @@ func (_m *ServerIface) GetSchemes(_a0 string, _a1 int, _a2 int) ([]*model.Scheme
func (_m *ServerIface) HTTPService() httpservice.HTTPService {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for HTTPService")
}
var r0 httpservice.HTTPService
if rf, ok := ret.Get(0).(func() httpservice.HTTPService); ok {
r0 = rf()
@@ -148,10 +128,6 @@ func (_m *ServerIface) HTTPService() httpservice.HTTPService {
func (_m *ServerIface) IsLeader() bool {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for IsLeader")
}
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
@@ -166,10 +142,6 @@ func (_m *ServerIface) IsLeader() bool {
func (_m *ServerIface) License() *model.License {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for License")
}
var r0 *model.License
if rf, ok := ret.Get(0).(func() *model.License); ok {
r0 = rf()
@@ -182,12 +154,13 @@ func (_m *ServerIface) License() *model.License {
return r0
}
// NewServerIface creates a new instance of ServerIface. 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 NewServerIface(t interface {
type mockConstructorTestingTNewServerIface interface {
mock.TestingT
Cleanup(func())
}) *ServerIface {
}
// NewServerIface creates a new instance of ServerIface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewServerIface(t mockConstructorTestingTNewServerIface) *ServerIface {
mock := &ServerIface{}
mock.Mock.Test(t)

Просмотреть файл

@@ -1,4 +1,4 @@
// Code generated by mockery v2.42.2. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make filestore-mocks`.
@@ -23,10 +23,6 @@ type FileBackend struct {
func (_m *FileBackend) AppendFile(fr io.Reader, path string) (int64, error) {
ret := _m.Called(fr, path)
if len(ret) == 0 {
panic("no return value specified for AppendFile")
}
var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(io.Reader, string) (int64, error)); ok {
@@ -51,10 +47,6 @@ func (_m *FileBackend) AppendFile(fr io.Reader, path string) (int64, error) {
func (_m *FileBackend) CopyFile(oldPath string, newPath string) error {
ret := _m.Called(oldPath, newPath)
if len(ret) == 0 {
panic("no return value specified for CopyFile")
}
var r0 error
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(oldPath, newPath)
@@ -69,10 +61,6 @@ func (_m *FileBackend) CopyFile(oldPath string, newPath string) error {
func (_m *FileBackend) DriverName() string {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for DriverName")
}
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
@@ -87,10 +75,6 @@ func (_m *FileBackend) DriverName() string {
func (_m *FileBackend) FileExists(path string) (bool, error) {
ret := _m.Called(path)
if len(ret) == 0 {
panic("no return value specified for FileExists")
}
var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(string) (bool, error)); ok {
@@ -115,10 +99,6 @@ func (_m *FileBackend) FileExists(path string) (bool, error) {
func (_m *FileBackend) FileModTime(path string) (time.Time, error) {
ret := _m.Called(path)
if len(ret) == 0 {
panic("no return value specified for FileModTime")
}
var r0 time.Time
var r1 error
if rf, ok := ret.Get(0).(func(string) (time.Time, error)); ok {
@@ -143,10 +123,6 @@ func (_m *FileBackend) FileModTime(path string) (time.Time, error) {
func (_m *FileBackend) FileSize(path string) (int64, error) {
ret := _m.Called(path)
if len(ret) == 0 {
panic("no return value specified for FileSize")
}
var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(string) (int64, error)); ok {
@@ -171,10 +147,6 @@ func (_m *FileBackend) FileSize(path string) (int64, error) {
func (_m *FileBackend) ListDirectory(path string) ([]string, error) {
ret := _m.Called(path)
if len(ret) == 0 {
panic("no return value specified for ListDirectory")
}
var r0 []string
var r1 error
if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok {
@@ -201,10 +173,6 @@ func (_m *FileBackend) ListDirectory(path string) ([]string, error) {
func (_m *FileBackend) ListDirectoryRecursively(path string) ([]string, error) {
ret := _m.Called(path)
if len(ret) == 0 {
panic("no return value specified for ListDirectoryRecursively")
}
var r0 []string
var r1 error
if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok {
@@ -231,10 +199,6 @@ func (_m *FileBackend) ListDirectoryRecursively(path string) ([]string, error) {
func (_m *FileBackend) MoveFile(oldPath string, newPath string) error {
ret := _m.Called(oldPath, newPath)
if len(ret) == 0 {
panic("no return value specified for MoveFile")
}
var r0 error
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(oldPath, newPath)
@@ -249,10 +213,6 @@ func (_m *FileBackend) MoveFile(oldPath string, newPath string) error {
func (_m *FileBackend) ReadFile(path string) ([]byte, error) {
ret := _m.Called(path)
if len(ret) == 0 {
panic("no return value specified for ReadFile")
}
var r0 []byte
var r1 error
if rf, ok := ret.Get(0).(func(string) ([]byte, error)); ok {
@@ -279,10 +239,6 @@ func (_m *FileBackend) ReadFile(path string) ([]byte, error) {
func (_m *FileBackend) Reader(path string) (filestore.ReadCloseSeeker, error) {
ret := _m.Called(path)
if len(ret) == 0 {
panic("no return value specified for Reader")
}
var r0 filestore.ReadCloseSeeker
var r1 error
if rf, ok := ret.Get(0).(func(string) (filestore.ReadCloseSeeker, error)); ok {
@@ -309,10 +265,6 @@ func (_m *FileBackend) Reader(path string) (filestore.ReadCloseSeeker, error) {
func (_m *FileBackend) RemoveDirectory(path string) error {
ret := _m.Called(path)
if len(ret) == 0 {
panic("no return value specified for RemoveDirectory")
}
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(path)
@@ -327,10 +279,6 @@ func (_m *FileBackend) RemoveDirectory(path string) error {
func (_m *FileBackend) RemoveFile(path string) error {
ret := _m.Called(path)
if len(ret) == 0 {
panic("no return value specified for RemoveFile")
}
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(path)
@@ -345,10 +293,6 @@ func (_m *FileBackend) RemoveFile(path string) error {
func (_m *FileBackend) TestConnection() error {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for TestConnection")
}
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
@@ -363,10 +307,6 @@ func (_m *FileBackend) TestConnection() error {
func (_m *FileBackend) WriteFile(fr io.Reader, path string) (int64, error) {
ret := _m.Called(fr, path)
if len(ret) == 0 {
panic("no return value specified for WriteFile")
}
var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(io.Reader, string) (int64, error)); ok {
@@ -387,12 +327,13 @@ func (_m *FileBackend) WriteFile(fr io.Reader, path string) (int64, error) {
return r0, r1
}
// NewFileBackend creates a new instance of FileBackend. 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 NewFileBackend(t interface {
type mockConstructorTestingTNewFileBackend interface {
mock.TestingT
Cleanup(func())
}) *FileBackend {
}
// NewFileBackend creates a new instance of FileBackend. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewFileBackend(t mockConstructorTestingTNewFileBackend) *FileBackend {
mock := &FileBackend{}
mock.Mock.Test(t)

Просмотреть файл

@@ -1,4 +1,4 @@
// Code generated by mockery v2.42.2. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make filestore-mocks`.
@@ -19,10 +19,6 @@ type FileBackendWithLinkGenerator struct {
func (_m *FileBackendWithLinkGenerator) GeneratePublicLink(path string) (string, time.Duration, error) {
ret := _m.Called(path)
if len(ret) == 0 {
panic("no return value specified for GeneratePublicLink")
}
var r0 string
var r1 time.Duration
var r2 error
@@ -50,12 +46,13 @@ func (_m *FileBackendWithLinkGenerator) GeneratePublicLink(path string) (string,
return r0, r1, r2
}
// NewFileBackendWithLinkGenerator creates a new instance of FileBackendWithLinkGenerator. 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 NewFileBackendWithLinkGenerator(t interface {
type mockConstructorTestingTNewFileBackendWithLinkGenerator interface {
mock.TestingT
Cleanup(func())
}) *FileBackendWithLinkGenerator {
}
// NewFileBackendWithLinkGenerator creates a new instance of FileBackendWithLinkGenerator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewFileBackendWithLinkGenerator(t mockConstructorTestingTNewFileBackendWithLinkGenerator) *FileBackendWithLinkGenerator {
mock := &FileBackendWithLinkGenerator{}
mock.Mock.Test(t)

Просмотреть файл

@@ -1,4 +1,4 @@
// Code generated by mockery v2.42.2. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make filestore-mocks`.
@@ -15,10 +15,6 @@ type ReadCloseSeeker struct {
func (_m *ReadCloseSeeker) Close() error {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Close")
}
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
@@ -33,10 +29,6 @@ func (_m *ReadCloseSeeker) Close() error {
func (_m *ReadCloseSeeker) Read(p []byte) (int, error) {
ret := _m.Called(p)
if len(ret) == 0 {
panic("no return value specified for Read")
}
var r0 int
var r1 error
if rf, ok := ret.Get(0).(func([]byte) (int, error)); ok {
@@ -61,10 +53,6 @@ func (_m *ReadCloseSeeker) Read(p []byte) (int, error) {
func (_m *ReadCloseSeeker) Seek(offset int64, whence int) (int64, error) {
ret := _m.Called(offset, whence)
if len(ret) == 0 {
panic("no return value specified for Seek")
}
var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(int64, int) (int64, error)); ok {
@@ -85,12 +73,13 @@ func (_m *ReadCloseSeeker) Seek(offset int64, whence int) (int64, error) {
return r0, r1
}
// NewReadCloseSeeker creates a new instance of ReadCloseSeeker. 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 NewReadCloseSeeker(t interface {
type mockConstructorTestingTNewReadCloseSeeker interface {
mock.TestingT
Cleanup(func())
}) *ReadCloseSeeker {
}
// NewReadCloseSeeker creates a new instance of ReadCloseSeeker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewReadCloseSeeker(t mockConstructorTestingTNewReadCloseSeeker) *ReadCloseSeeker {
mock := &ReadCloseSeeker{}
mock.Mock.Test(t)