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 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)