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 telemetry-mocks`.
@@ -24,6 +24,10 @@ type ServerIface struct {
func (_m *ServerIface) 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()
@@ -40,6 +44,10 @@ func (_m *ServerIface) Config() *model.Config {
func (_m *ServerIface) GetPluginsEnvironment() *plugin.Environment {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetPluginsEnvironment")
}
var r0 *plugin.Environment
if rf, ok := ret.Get(0).(func() *plugin.Environment); ok {
r0 = rf()
@@ -56,6 +64,10 @@ func (_m *ServerIface) GetPluginsEnvironment() *plugin.Environment {
func (_m *ServerIface) GetRoleByName(_a0 context.Context, _a1 string) (*model.Role, *model.AppError) {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for GetRoleByName")
}
var r0 *model.Role
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(context.Context, string) (*model.Role, *model.AppError)); ok {
@@ -84,6 +96,10 @@ func (_m *ServerIface) GetRoleByName(_a0 context.Context, _a1 string) (*model.Ro
func (_m *ServerIface) GetSchemes(_a0 string, _a1 int, _a2 int) ([]*model.Scheme, *model.AppError) {
ret := _m.Called(_a0, _a1, _a2)
if len(ret) == 0 {
panic("no return value specified for GetSchemes")
}
var r0 []*model.Scheme
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, int, int) ([]*model.Scheme, *model.AppError)); ok {
@@ -112,6 +128,10 @@ func (_m *ServerIface) GetSchemes(_a0 string, _a1 int, _a2 int) ([]*model.Scheme
func (_m *ServerIface) HTTPService() httpservice.HTTPService {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for HTTPService")
}
var r0 httpservice.HTTPService
if rf, ok := ret.Get(0).(func() httpservice.HTTPService); ok {
r0 = rf()
@@ -128,6 +148,10 @@ func (_m *ServerIface) HTTPService() httpservice.HTTPService {
func (_m *ServerIface) 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,6 +166,10 @@ func (_m *ServerIface) IsLeader() bool {
func (_m *ServerIface) License() *model.License {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for License")
}
var r0 *model.License
if rf, ok := ret.Get(0).(func() *model.License); ok {
r0 = rf()
@@ -154,13 +182,12 @@ func (_m *ServerIface) License() *model.License {
return r0
}
type mockConstructorTestingTNewServerIface interface {
// NewServerIface creates a new instance of ServerIface. 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 NewServerIface(t interface {
mock.TestingT
Cleanup(func())
}
// NewServerIface creates a new instance of ServerIface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewServerIface(t mockConstructorTestingTNewServerIface) *ServerIface {
}) *ServerIface {
mock := &ServerIface{}
mock.Mock.Test(t)