MM-57759: Added mockery support for 1.22 (#26774)
* Revert "Revert "MM-57759: Bump mockery to version 2.42.2 to support go 1.22^" (#26772)"
This reverts commit cd3b5b46e1.
* Added the hooks.go file changes as well
```release-note
NONE
```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
96ab35ba34
Коммит
870cee30c6
@@ -1,4 +1,4 @@
|
||||
// Code generated by mockery v2.23.2. DO NOT EDIT.
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make searchengine-mocks`.
|
||||
|
||||
@@ -21,6 +21,10 @@ 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)
|
||||
@@ -37,6 +41,10 @@ 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)
|
||||
@@ -53,6 +61,10 @@ 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)
|
||||
@@ -69,6 +81,10 @@ 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)
|
||||
@@ -85,6 +101,10 @@ 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)
|
||||
@@ -101,6 +121,10 @@ 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)
|
||||
@@ -117,6 +141,10 @@ 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)
|
||||
@@ -133,6 +161,10 @@ 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)
|
||||
@@ -149,6 +181,10 @@ 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)
|
||||
@@ -165,6 +201,10 @@ 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)
|
||||
@@ -181,6 +221,10 @@ 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()
|
||||
@@ -195,6 +239,10 @@ 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()
|
||||
@@ -209,6 +257,10 @@ 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()
|
||||
@@ -225,6 +277,10 @@ 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()
|
||||
@@ -239,6 +295,10 @@ 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)
|
||||
@@ -255,6 +315,10 @@ 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)
|
||||
@@ -271,6 +335,10 @@ 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)
|
||||
@@ -287,6 +355,10 @@ 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)
|
||||
@@ -303,6 +375,10 @@ 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()
|
||||
@@ -317,6 +393,10 @@ 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()
|
||||
@@ -331,6 +411,10 @@ 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()
|
||||
@@ -345,6 +429,10 @@ 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()
|
||||
@@ -359,6 +447,10 @@ 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()
|
||||
@@ -373,6 +465,10 @@ 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()
|
||||
@@ -387,6 +483,10 @@ 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()
|
||||
@@ -401,6 +501,10 @@ 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)
|
||||
@@ -417,6 +521,10 @@ 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)
|
||||
@@ -433,6 +541,10 @@ 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)
|
||||
@@ -449,6 +561,10 @@ 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 {
|
||||
@@ -477,6 +593,10 @@ 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 {
|
||||
@@ -505,6 +625,10 @@ 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
|
||||
@@ -542,6 +666,10 @@ 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
|
||||
@@ -579,6 +707,10 @@ 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 {
|
||||
@@ -607,6 +739,10 @@ 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()
|
||||
@@ -623,6 +759,10 @@ 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()
|
||||
@@ -639,6 +779,10 @@ 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)
|
||||
@@ -656,13 +800,12 @@ func (_m *SearchEngineInterface) UpdateConfig(cfg *model.Config) {
|
||||
_m.Called(cfg)
|
||||
}
|
||||
|
||||
type mockConstructorTestingTNewSearchEngineInterface interface {
|
||||
// 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 {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// 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 {
|
||||
}) *SearchEngineInterface {
|
||||
mock := &SearchEngineInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user