[MM-54288] Support Packet V2 (#29403)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
091d1bba8b
Коммит
8d4bf4bae0
@@ -17,7 +17,6 @@ type LdapInterface interface {
|
||||
CheckProviderAttributes(c request.CTX, LS *model.LdapSettings, ouser *model.User, patch *model.UserPatch) string
|
||||
SwitchToLdap(c request.CTX, userID, ldapID, ldapPassword string) *model.AppError
|
||||
StartSynchronizeJob(c request.CTX, waitForJobToFinish bool, includeRemovedMembers bool) (*model.Job, *model.AppError)
|
||||
RunTest(rctx request.CTX) *model.AppError
|
||||
GetAllLdapUsers(c request.CTX) ([]*model.User, *model.AppError)
|
||||
MigrateIDAttribute(c request.CTX, toAttribute string) error
|
||||
GetGroup(rctx request.CTX, groupUID string) (*model.Group, *model.AppError)
|
||||
@@ -26,5 +25,9 @@ type LdapInterface interface {
|
||||
UpdateProfilePictureIfNecessary(request.CTX, model.User, model.Session)
|
||||
GetADLdapIdFromSAMLId(c request.CTX, authData string) string
|
||||
GetSAMLIdFromADLdapId(c request.CTX, authData string) string
|
||||
}
|
||||
|
||||
type LdapDiagnosticInterface interface {
|
||||
RunTest(rctx request.CTX) *model.AppError
|
||||
GetVendorNameAndVendorVersion(rctx request.CTX) (string, string, error)
|
||||
}
|
||||
|
||||
85
server/einterfaces/mocks/LdapDiagnosticInterface.go
Обычный файл
85
server/einterfaces/mocks/LdapDiagnosticInterface.go
Обычный файл
@@ -0,0 +1,85 @@
|
||||
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
||||
|
||||
// Regenerate this file using `make einterfaces-mocks`.
|
||||
|
||||
package mocks
|
||||
|
||||
import (
|
||||
model "github.com/mattermost/mattermost/server/public/model"
|
||||
request "github.com/mattermost/mattermost/server/public/shared/request"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// LdapDiagnosticInterface is an autogenerated mock type for the LdapDiagnosticInterface type
|
||||
type LdapDiagnosticInterface struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// GetVendorNameAndVendorVersion provides a mock function with given fields: rctx
|
||||
func (_m *LdapDiagnosticInterface) GetVendorNameAndVendorVersion(rctx request.CTX) (string, string, error) {
|
||||
ret := _m.Called(rctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetVendorNameAndVendorVersion")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
var r1 string
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(0).(func(request.CTX) (string, string, error)); ok {
|
||||
return rf(rctx)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(request.CTX) string); ok {
|
||||
r0 = rf(rctx)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(request.CTX) string); ok {
|
||||
r1 = rf(rctx)
|
||||
} else {
|
||||
r1 = ret.Get(1).(string)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(2).(func(request.CTX) error); ok {
|
||||
r2 = rf(rctx)
|
||||
} else {
|
||||
r2 = ret.Error(2)
|
||||
}
|
||||
|
||||
return r0, r1, r2
|
||||
}
|
||||
|
||||
// RunTest provides a mock function with given fields: rctx
|
||||
func (_m *LdapDiagnosticInterface) RunTest(rctx request.CTX) *model.AppError {
|
||||
ret := _m.Called(rctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for RunTest")
|
||||
}
|
||||
|
||||
var r0 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(request.CTX) *model.AppError); ok {
|
||||
r0 = rf(rctx)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.AppError)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// NewLdapDiagnosticInterface creates a new instance of LdapDiagnosticInterface. 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 NewLdapDiagnosticInterface(t interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}) *LdapDiagnosticInterface {
|
||||
mock := &LdapDiagnosticInterface{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) })
|
||||
|
||||
return mock
|
||||
}
|
||||
@@ -328,41 +328,6 @@ func (_m *LdapInterface) GetUserAttributes(rctx request.CTX, id string, attribut
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetVendorNameAndVendorVersion provides a mock function with given fields: rctx
|
||||
func (_m *LdapInterface) GetVendorNameAndVendorVersion(rctx request.CTX) (string, string, error) {
|
||||
ret := _m.Called(rctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for GetVendorNameAndVendorVersion")
|
||||
}
|
||||
|
||||
var r0 string
|
||||
var r1 string
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(0).(func(request.CTX) (string, string, error)); ok {
|
||||
return rf(rctx)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(request.CTX) string); ok {
|
||||
r0 = rf(rctx)
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(request.CTX) string); ok {
|
||||
r1 = rf(rctx)
|
||||
} else {
|
||||
r1 = ret.Get(1).(string)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(2).(func(request.CTX) error); ok {
|
||||
r2 = rf(rctx)
|
||||
} else {
|
||||
r2 = ret.Error(2)
|
||||
}
|
||||
|
||||
return r0, r1, r2
|
||||
}
|
||||
|
||||
// MigrateIDAttribute provides a mock function with given fields: c, toAttribute
|
||||
func (_m *LdapInterface) MigrateIDAttribute(c request.CTX, toAttribute string) error {
|
||||
ret := _m.Called(c, toAttribute)
|
||||
@@ -381,26 +346,6 @@ func (_m *LdapInterface) MigrateIDAttribute(c request.CTX, toAttribute string) e
|
||||
return r0
|
||||
}
|
||||
|
||||
// RunTest provides a mock function with given fields: rctx
|
||||
func (_m *LdapInterface) RunTest(rctx request.CTX) *model.AppError {
|
||||
ret := _m.Called(rctx)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for RunTest")
|
||||
}
|
||||
|
||||
var r0 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(request.CTX) *model.AppError); ok {
|
||||
r0 = rf(rctx)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.AppError)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// StartSynchronizeJob provides a mock function with given fields: c, waitForJobToFinish, includeRemovedMembers
|
||||
func (_m *LdapInterface) StartSynchronizeJob(c request.CTX, waitForJobToFinish bool, includeRemovedMembers bool) (*model.Job, *model.AppError) {
|
||||
ret := _m.Called(c, waitForJobToFinish, includeRemovedMembers)
|
||||
|
||||
Ссылка в новой задаче
Block a user