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 SamlInterface struct {
func (_m *SamlInterface) BuildRequest(c request.CTX, relayState string) (*model.SamlAuthRequest, *model.AppError) {
ret := _m.Called(c, relayState)
if len(ret) == 0 {
panic("no return value specified for BuildRequest")
}
var r0 *model.SamlAuthRequest
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.SamlAuthRequest, *model.AppError)); ok {
@@ -47,6 +51,10 @@ func (_m *SamlInterface) BuildRequest(c request.CTX, relayState string) (*model.
func (_m *SamlInterface) CheckProviderAttributes(c request.CTX, SS *model.SamlSettings, ouser *model.User, patch *model.UserPatch) string {
ret := _m.Called(c, SS, ouser, patch)
if len(ret) == 0 {
panic("no return value specified for CheckProviderAttributes")
}
var r0 string
if rf, ok := ret.Get(0).(func(request.CTX, *model.SamlSettings, *model.User, *model.UserPatch) string); ok {
r0 = rf(c, SS, ouser, patch)
@@ -61,6 +69,10 @@ func (_m *SamlInterface) CheckProviderAttributes(c request.CTX, SS *model.SamlSe
func (_m *SamlInterface) ConfigureSP(c request.CTX) error {
ret := _m.Called(c)
if len(ret) == 0 {
panic("no return value specified for ConfigureSP")
}
var r0 error
if rf, ok := ret.Get(0).(func(request.CTX) error); ok {
r0 = rf(c)
@@ -75,6 +87,10 @@ func (_m *SamlInterface) ConfigureSP(c request.CTX) error {
func (_m *SamlInterface) DoLogin(c request.CTX, encodedXML string, relayState map[string]string) (*model.User, *model.AppError) {
ret := _m.Called(c, encodedXML, relayState)
if len(ret) == 0 {
panic("no return value specified for DoLogin")
}
var r0 *model.User
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string, map[string]string) (*model.User, *model.AppError)); ok {
@@ -103,6 +119,10 @@ func (_m *SamlInterface) DoLogin(c request.CTX, encodedXML string, relayState ma
func (_m *SamlInterface) GetMetadata(c request.CTX) (string, *model.AppError) {
ret := _m.Called(c)
if len(ret) == 0 {
panic("no return value specified for GetMetadata")
}
var r0 string
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX) (string, *model.AppError)); ok {
@@ -125,13 +145,12 @@ func (_m *SamlInterface) GetMetadata(c request.CTX) (string, *model.AppError) {
return r0, r1
}
type mockConstructorTestingTNewSamlInterface interface {
// NewSamlInterface creates a new instance of SamlInterface. 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 NewSamlInterface(t interface {
mock.TestingT
Cleanup(func())
}
// NewSamlInterface creates a new instance of SamlInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewSamlInterface(t mockConstructorTestingTNewSamlInterface) *SamlInterface {
}) *SamlInterface {
mock := &SamlInterface{}
mock.Mock.Test(t)