Mockery started to throw errors like "Unexpected package creation during export data loading".

This was consistently reproducible locally and on upgrade, it has gone away.

```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2023-04-10 14:20:57 +05:30
коммит произвёл GitHub
родитель 6be0ed0d19
Коммит bcf115e315
77 изменённых файлов: 4317 добавлений и 876 удалений

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make searchengine-mocks`.
@@ -405,6 +405,10 @@ func (_m *SearchEngineInterface) SearchChannels(teamId string, userID string, te
ret := _m.Called(teamId, userID, term, isGuest)
var r0 []string
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, string, string, bool) ([]string, *model.AppError)); ok {
return rf(teamId, userID, term, isGuest)
}
if rf, ok := ret.Get(0).(func(string, string, string, bool) []string); ok {
r0 = rf(teamId, userID, term, isGuest)
} else {
@@ -413,7 +417,6 @@ func (_m *SearchEngineInterface) SearchChannels(teamId string, userID string, te
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string, string, string, bool) *model.AppError); ok {
r1 = rf(teamId, userID, term, isGuest)
} else {
@@ -430,6 +433,10 @@ func (_m *SearchEngineInterface) SearchFiles(channels model.ChannelList, searchP
ret := _m.Called(channels, searchParams, page, perPage)
var r0 []string
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(model.ChannelList, []*model.SearchParams, int, int) ([]string, *model.AppError)); ok {
return rf(channels, searchParams, page, perPage)
}
if rf, ok := ret.Get(0).(func(model.ChannelList, []*model.SearchParams, int, int) []string); ok {
r0 = rf(channels, searchParams, page, perPage)
} else {
@@ -438,7 +445,6 @@ func (_m *SearchEngineInterface) SearchFiles(channels model.ChannelList, searchP
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(model.ChannelList, []*model.SearchParams, int, int) *model.AppError); ok {
r1 = rf(channels, searchParams, page, perPage)
} else {
@@ -455,6 +461,11 @@ func (_m *SearchEngineInterface) SearchPosts(channels model.ChannelList, searchP
ret := _m.Called(channels, searchParams, page, perPage)
var r0 []string
var r1 model.PostSearchMatches
var r2 *model.AppError
if rf, ok := ret.Get(0).(func(model.ChannelList, []*model.SearchParams, int, int) ([]string, model.PostSearchMatches, *model.AppError)); ok {
return rf(channels, searchParams, page, perPage)
}
if rf, ok := ret.Get(0).(func(model.ChannelList, []*model.SearchParams, int, int) []string); ok {
r0 = rf(channels, searchParams, page, perPage)
} else {
@@ -463,7 +474,6 @@ func (_m *SearchEngineInterface) SearchPosts(channels model.ChannelList, searchP
}
}
var r1 model.PostSearchMatches
if rf, ok := ret.Get(1).(func(model.ChannelList, []*model.SearchParams, int, int) model.PostSearchMatches); ok {
r1 = rf(channels, searchParams, page, perPage)
} else {
@@ -472,7 +482,6 @@ func (_m *SearchEngineInterface) SearchPosts(channels model.ChannelList, searchP
}
}
var r2 *model.AppError
if rf, ok := ret.Get(2).(func(model.ChannelList, []*model.SearchParams, int, int) *model.AppError); ok {
r2 = rf(channels, searchParams, page, perPage)
} else {
@@ -489,6 +498,11 @@ func (_m *SearchEngineInterface) SearchUsersInChannel(teamId string, channelId s
ret := _m.Called(teamId, channelId, restrictedToChannels, term, options)
var r0 []string
var r1 []string
var r2 *model.AppError
if rf, ok := ret.Get(0).(func(string, string, []string, string, *model.UserSearchOptions) ([]string, []string, *model.AppError)); ok {
return rf(teamId, channelId, restrictedToChannels, term, options)
}
if rf, ok := ret.Get(0).(func(string, string, []string, string, *model.UserSearchOptions) []string); ok {
r0 = rf(teamId, channelId, restrictedToChannels, term, options)
} else {
@@ -497,7 +511,6 @@ func (_m *SearchEngineInterface) SearchUsersInChannel(teamId string, channelId s
}
}
var r1 []string
if rf, ok := ret.Get(1).(func(string, string, []string, string, *model.UserSearchOptions) []string); ok {
r1 = rf(teamId, channelId, restrictedToChannels, term, options)
} else {
@@ -506,7 +519,6 @@ func (_m *SearchEngineInterface) SearchUsersInChannel(teamId string, channelId s
}
}
var r2 *model.AppError
if rf, ok := ret.Get(2).(func(string, string, []string, string, *model.UserSearchOptions) *model.AppError); ok {
r2 = rf(teamId, channelId, restrictedToChannels, term, options)
} else {
@@ -523,6 +535,10 @@ func (_m *SearchEngineInterface) SearchUsersInTeam(teamId string, restrictedToCh
ret := _m.Called(teamId, restrictedToChannels, term, options)
var r0 []string
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, []string, string, *model.UserSearchOptions) ([]string, *model.AppError)); ok {
return rf(teamId, restrictedToChannels, term, options)
}
if rf, ok := ret.Get(0).(func(string, []string, string, *model.UserSearchOptions) []string); ok {
r0 = rf(teamId, restrictedToChannels, term, options)
} else {
@@ -531,7 +547,6 @@ func (_m *SearchEngineInterface) SearchUsersInTeam(teamId string, restrictedToCh
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string, []string, string, *model.UserSearchOptions) *model.AppError); ok {
r1 = rf(teamId, restrictedToChannels, term, options)
} else {
@@ -595,3 +610,18 @@ func (_m *SearchEngineInterface) TestConfig(cfg *model.Config) *model.AppError {
func (_m *SearchEngineInterface) UpdateConfig(cfg *model.Config) {
_m.Called(cfg)
}
type mockConstructorTestingTNewSearchEngineInterface 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 {
mock := &SearchEngineInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}