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
```
Этот коммит содержится в:
Agniva De Sarker
2024-04-13 08:15:59 +05:30
коммит произвёл GitHub
родитель 96ab35ba34
Коммит 870cee30c6
84 изменённых файлов: 5382 добавлений и 504 удалений

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

@@ -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 einterfaces-mocks`.
@@ -19,6 +19,10 @@ type MessageExportInterface struct {
func (_m *MessageExportInterface) RunExport(c request.CTX, format string, since int64, limit int) (int64, *model.AppError) {
ret := _m.Called(c, format, since, limit)
if len(ret) == 0 {
panic("no return value specified for RunExport")
}
var r0 int64
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string, int64, int) (int64, *model.AppError)); ok {
@@ -45,6 +49,10 @@ func (_m *MessageExportInterface) RunExport(c request.CTX, format string, since
func (_m *MessageExportInterface) StartSynchronizeJob(c request.CTX, exportFromTimestamp int64) (*model.Job, *model.AppError) {
ret := _m.Called(c, exportFromTimestamp)
if len(ret) == 0 {
panic("no return value specified for StartSynchronizeJob")
}
var r0 *model.Job
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, int64) (*model.Job, *model.AppError)); ok {
@@ -69,13 +77,12 @@ func (_m *MessageExportInterface) StartSynchronizeJob(c request.CTX, exportFromT
return r0, r1
}
type mockConstructorTestingTNewMessageExportInterface interface {
// NewMessageExportInterface creates a new instance of MessageExportInterface. 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 NewMessageExportInterface(t interface {
mock.TestingT
Cleanup(func())
}
// NewMessageExportInterface creates a new instance of MessageExportInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMessageExportInterface(t mockConstructorTestingTNewMessageExportInterface) *MessageExportInterface {
}) *MessageExportInterface {
mock := &MessageExportInterface{}
mock.Mock.Test(t)