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 NotificationInterface struct {
func (_m *NotificationInterface) CheckLicense() *model.AppError {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for CheckLicense")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func() *model.AppError); ok {
r0 = rf()
@@ -35,6 +39,10 @@ func (_m *NotificationInterface) CheckLicense() *model.AppError {
func (_m *NotificationInterface) GetNotificationMessage(c request.CTX, ack *model.PushNotificationAck, userID string) (*model.PushNotification, *model.AppError) {
ret := _m.Called(c, ack, userID)
if len(ret) == 0 {
panic("no return value specified for GetNotificationMessage")
}
var r0 *model.PushNotification
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, *model.PushNotificationAck, string) (*model.PushNotification, *model.AppError)); ok {
@@ -59,13 +67,12 @@ func (_m *NotificationInterface) GetNotificationMessage(c request.CTX, ack *mode
return r0, r1
}
type mockConstructorTestingTNewNotificationInterface interface {
// NewNotificationInterface creates a new instance of NotificationInterface. 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 NewNotificationInterface(t interface {
mock.TestingT
Cleanup(func())
}
// NewNotificationInterface creates a new instance of NotificationInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewNotificationInterface(t mockConstructorTestingTNewNotificationInterface) *NotificationInterface {
}) *NotificationInterface {
mock := &NotificationInterface{}
mock.Mock.Test(t)