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 AccountMigrationInterface struct {
func (_m *AccountMigrationInterface) MigrateToLdap(c request.CTX, fromAuthService string, foreignUserFieldNameToMatch string, force bool, dryRun bool) *model.AppError {
ret := _m.Called(c, fromAuthService, foreignUserFieldNameToMatch, force, dryRun)
if len(ret) == 0 {
panic("no return value specified for MigrateToLdap")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string, string, bool, bool) *model.AppError); ok {
r0 = rf(c, fromAuthService, foreignUserFieldNameToMatch, force, dryRun)
@@ -35,6 +39,10 @@ func (_m *AccountMigrationInterface) MigrateToLdap(c request.CTX, fromAuthServic
func (_m *AccountMigrationInterface) MigrateToSaml(c request.CTX, fromAuthService string, usersMap map[string]string, auto bool, dryRun bool) *model.AppError {
ret := _m.Called(c, fromAuthService, usersMap, auto, dryRun)
if len(ret) == 0 {
panic("no return value specified for MigrateToSaml")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string, map[string]string, bool, bool) *model.AppError); ok {
r0 = rf(c, fromAuthService, usersMap, auto, dryRun)
@@ -47,13 +55,12 @@ func (_m *AccountMigrationInterface) MigrateToSaml(c request.CTX, fromAuthServic
return r0
}
type mockConstructorTestingTNewAccountMigrationInterface interface {
// NewAccountMigrationInterface creates a new instance of AccountMigrationInterface. 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 NewAccountMigrationInterface(t interface {
mock.TestingT
Cleanup(func())
}
// NewAccountMigrationInterface creates a new instance of AccountMigrationInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewAccountMigrationInterface(t mockConstructorTestingTNewAccountMigrationInterface) *AccountMigrationInterface {
}) *AccountMigrationInterface {
mock := &AccountMigrationInterface{}
mock.Mock.Test(t)

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

@@ -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 CloudInterface struct {
func (_m *CloudInterface) ApplyIPFilters(userID string, ranges *model.AllowedIPRanges) (*model.AllowedIPRanges, error) {
ret := _m.Called(userID, ranges)
if len(ret) == 0 {
panic("no return value specified for ApplyIPFilters")
}
var r0 *model.AllowedIPRanges
var r1 error
if rf, ok := ret.Get(0).(func(string, *model.AllowedIPRanges) (*model.AllowedIPRanges, error)); ok {
@@ -45,6 +49,10 @@ func (_m *CloudInterface) ApplyIPFilters(userID string, ranges *model.AllowedIPR
func (_m *CloudInterface) BootstrapSelfHostedSignup(req model.BootstrapSelfHostedSignupRequest) (*model.BootstrapSelfHostedSignupResponse, error) {
ret := _m.Called(req)
if len(ret) == 0 {
panic("no return value specified for BootstrapSelfHostedSignup")
}
var r0 *model.BootstrapSelfHostedSignupResponse
var r1 error
if rf, ok := ret.Get(0).(func(model.BootstrapSelfHostedSignupRequest) (*model.BootstrapSelfHostedSignupResponse, error)); ok {
@@ -71,6 +79,10 @@ func (_m *CloudInterface) BootstrapSelfHostedSignup(req model.BootstrapSelfHoste
func (_m *CloudInterface) ChangeSubscription(userID string, subscriptionID string, subscriptionChange *model.SubscriptionChange) (*model.Subscription, error) {
ret := _m.Called(userID, subscriptionID, subscriptionChange)
if len(ret) == 0 {
panic("no return value specified for ChangeSubscription")
}
var r0 *model.Subscription
var r1 error
if rf, ok := ret.Get(0).(func(string, string, *model.SubscriptionChange) (*model.Subscription, error)); ok {
@@ -97,6 +109,10 @@ func (_m *CloudInterface) ChangeSubscription(userID string, subscriptionID strin
func (_m *CloudInterface) CheckCWSConnection(userId string) error {
ret := _m.Called(userId)
if len(ret) == 0 {
panic("no return value specified for CheckCWSConnection")
}
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(userId)
@@ -111,6 +127,10 @@ func (_m *CloudInterface) CheckCWSConnection(userId string) error {
func (_m *CloudInterface) ConfirmCustomerPayment(userID string, confirmRequest *model.ConfirmPaymentMethodRequest) error {
ret := _m.Called(userID, confirmRequest)
if len(ret) == 0 {
panic("no return value specified for ConfirmCustomerPayment")
}
var r0 error
if rf, ok := ret.Get(0).(func(string, *model.ConfirmPaymentMethodRequest) error); ok {
r0 = rf(userID, confirmRequest)
@@ -125,6 +145,10 @@ func (_m *CloudInterface) ConfirmCustomerPayment(userID string, confirmRequest *
func (_m *CloudInterface) ConfirmSelfHostedExpansion(req model.SelfHostedConfirmPaymentMethodRequest, requesterEmail string) (*model.SelfHostedSignupConfirmResponse, error) {
ret := _m.Called(req, requesterEmail)
if len(ret) == 0 {
panic("no return value specified for ConfirmSelfHostedExpansion")
}
var r0 *model.SelfHostedSignupConfirmResponse
var r1 error
if rf, ok := ret.Get(0).(func(model.SelfHostedConfirmPaymentMethodRequest, string) (*model.SelfHostedSignupConfirmResponse, error)); ok {
@@ -151,6 +175,10 @@ func (_m *CloudInterface) ConfirmSelfHostedExpansion(req model.SelfHostedConfirm
func (_m *CloudInterface) ConfirmSelfHostedSignup(req model.SelfHostedConfirmPaymentMethodRequest, requesterEmail string) (*model.SelfHostedSignupConfirmResponse, error) {
ret := _m.Called(req, requesterEmail)
if len(ret) == 0 {
panic("no return value specified for ConfirmSelfHostedSignup")
}
var r0 *model.SelfHostedSignupConfirmResponse
var r1 error
if rf, ok := ret.Get(0).(func(model.SelfHostedConfirmPaymentMethodRequest, string) (*model.SelfHostedSignupConfirmResponse, error)); ok {
@@ -177,6 +205,10 @@ func (_m *CloudInterface) ConfirmSelfHostedSignup(req model.SelfHostedConfirmPay
func (_m *CloudInterface) ConfirmSelfHostedSignupLicenseApplication() error {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for ConfirmSelfHostedSignupLicenseApplication")
}
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
@@ -191,6 +223,10 @@ func (_m *CloudInterface) ConfirmSelfHostedSignupLicenseApplication() error {
func (_m *CloudInterface) CreateCustomerPayment(userID string) (*model.StripeSetupIntent, error) {
ret := _m.Called(userID)
if len(ret) == 0 {
panic("no return value specified for CreateCustomerPayment")
}
var r0 *model.StripeSetupIntent
var r1 error
if rf, ok := ret.Get(0).(func(string) (*model.StripeSetupIntent, error)); ok {
@@ -217,6 +253,10 @@ func (_m *CloudInterface) CreateCustomerPayment(userID string) (*model.StripeSet
func (_m *CloudInterface) CreateCustomerSelfHostedSignup(req model.SelfHostedCustomerForm, requesterEmail string) (*model.SelfHostedSignupCustomerResponse, error) {
ret := _m.Called(req, requesterEmail)
if len(ret) == 0 {
panic("no return value specified for CreateCustomerSelfHostedSignup")
}
var r0 *model.SelfHostedSignupCustomerResponse
var r1 error
if rf, ok := ret.Get(0).(func(model.SelfHostedCustomerForm, string) (*model.SelfHostedSignupCustomerResponse, error)); ok {
@@ -243,6 +283,10 @@ func (_m *CloudInterface) CreateCustomerSelfHostedSignup(req model.SelfHostedCus
func (_m *CloudInterface) CreateOrUpdateSubscriptionHistoryEvent(userID string, userCount int) (*model.SubscriptionHistory, error) {
ret := _m.Called(userID, userCount)
if len(ret) == 0 {
panic("no return value specified for CreateOrUpdateSubscriptionHistoryEvent")
}
var r0 *model.SubscriptionHistory
var r1 error
if rf, ok := ret.Get(0).(func(string, int) (*model.SubscriptionHistory, error)); ok {
@@ -269,6 +313,10 @@ func (_m *CloudInterface) CreateOrUpdateSubscriptionHistoryEvent(userID string,
func (_m *CloudInterface) GetCloudCustomer(userID string) (*model.CloudCustomer, error) {
ret := _m.Called(userID)
if len(ret) == 0 {
panic("no return value specified for GetCloudCustomer")
}
var r0 *model.CloudCustomer
var r1 error
if rf, ok := ret.Get(0).(func(string) (*model.CloudCustomer, error)); ok {
@@ -295,6 +343,10 @@ func (_m *CloudInterface) GetCloudCustomer(userID string) (*model.CloudCustomer,
func (_m *CloudInterface) GetCloudLimits(userID string) (*model.ProductLimits, error) {
ret := _m.Called(userID)
if len(ret) == 0 {
panic("no return value specified for GetCloudLimits")
}
var r0 *model.ProductLimits
var r1 error
if rf, ok := ret.Get(0).(func(string) (*model.ProductLimits, error)); ok {
@@ -321,6 +373,10 @@ func (_m *CloudInterface) GetCloudLimits(userID string) (*model.ProductLimits, e
func (_m *CloudInterface) GetCloudProduct(userID string, productID string) (*model.Product, error) {
ret := _m.Called(userID, productID)
if len(ret) == 0 {
panic("no return value specified for GetCloudProduct")
}
var r0 *model.Product
var r1 error
if rf, ok := ret.Get(0).(func(string, string) (*model.Product, error)); ok {
@@ -347,6 +403,10 @@ func (_m *CloudInterface) GetCloudProduct(userID string, productID string) (*mod
func (_m *CloudInterface) GetCloudProducts(userID string, includeLegacyProducts bool) ([]*model.Product, error) {
ret := _m.Called(userID, includeLegacyProducts)
if len(ret) == 0 {
panic("no return value specified for GetCloudProducts")
}
var r0 []*model.Product
var r1 error
if rf, ok := ret.Get(0).(func(string, bool) ([]*model.Product, error)); ok {
@@ -373,6 +433,10 @@ func (_m *CloudInterface) GetCloudProducts(userID string, includeLegacyProducts
func (_m *CloudInterface) GetIPFilters(userID string) (*model.AllowedIPRanges, error) {
ret := _m.Called(userID)
if len(ret) == 0 {
panic("no return value specified for GetIPFilters")
}
var r0 *model.AllowedIPRanges
var r1 error
if rf, ok := ret.Get(0).(func(string) (*model.AllowedIPRanges, error)); ok {
@@ -399,6 +463,10 @@ func (_m *CloudInterface) GetIPFilters(userID string) (*model.AllowedIPRanges, e
func (_m *CloudInterface) GetInstallation(userID string) (*model.Installation, error) {
ret := _m.Called(userID)
if len(ret) == 0 {
panic("no return value specified for GetInstallation")
}
var r0 *model.Installation
var r1 error
if rf, ok := ret.Get(0).(func(string) (*model.Installation, error)); ok {
@@ -425,6 +493,10 @@ func (_m *CloudInterface) GetInstallation(userID string) (*model.Installation, e
func (_m *CloudInterface) GetInvoicePDF(userID string, invoiceID string) ([]byte, string, error) {
ret := _m.Called(userID, invoiceID)
if len(ret) == 0 {
panic("no return value specified for GetInvoicePDF")
}
var r0 []byte
var r1 string
var r2 error
@@ -458,6 +530,10 @@ func (_m *CloudInterface) GetInvoicePDF(userID string, invoiceID string) ([]byte
func (_m *CloudInterface) GetInvoicesForSubscription(userID string) ([]*model.Invoice, error) {
ret := _m.Called(userID)
if len(ret) == 0 {
panic("no return value specified for GetInvoicesForSubscription")
}
var r0 []*model.Invoice
var r1 error
if rf, ok := ret.Get(0).(func(string) ([]*model.Invoice, error)); ok {
@@ -484,6 +560,10 @@ func (_m *CloudInterface) GetInvoicesForSubscription(userID string) ([]*model.In
func (_m *CloudInterface) GetLicenseSelfServeStatus(userID string, token string) (*model.SubscriptionLicenseSelfServeStatusResponse, error) {
ret := _m.Called(userID, token)
if len(ret) == 0 {
panic("no return value specified for GetLicenseSelfServeStatus")
}
var r0 *model.SubscriptionLicenseSelfServeStatusResponse
var r1 error
if rf, ok := ret.Get(0).(func(string, string) (*model.SubscriptionLicenseSelfServeStatusResponse, error)); ok {
@@ -510,6 +590,10 @@ func (_m *CloudInterface) GetLicenseSelfServeStatus(userID string, token string)
func (_m *CloudInterface) GetSelfHostedInvoicePDF(invoiceID string) ([]byte, string, error) {
ret := _m.Called(invoiceID)
if len(ret) == 0 {
panic("no return value specified for GetSelfHostedInvoicePDF")
}
var r0 []byte
var r1 string
var r2 error
@@ -543,6 +627,10 @@ func (_m *CloudInterface) GetSelfHostedInvoicePDF(invoiceID string) ([]byte, str
func (_m *CloudInterface) GetSelfHostedInvoices(rctx request.CTX) ([]*model.Invoice, error) {
ret := _m.Called(rctx)
if len(ret) == 0 {
panic("no return value specified for GetSelfHostedInvoices")
}
var r0 []*model.Invoice
var r1 error
if rf, ok := ret.Get(0).(func(request.CTX) ([]*model.Invoice, error)); ok {
@@ -569,6 +657,10 @@ func (_m *CloudInterface) GetSelfHostedInvoices(rctx request.CTX) ([]*model.Invo
func (_m *CloudInterface) GetSelfHostedProducts(userID string) ([]*model.Product, error) {
ret := _m.Called(userID)
if len(ret) == 0 {
panic("no return value specified for GetSelfHostedProducts")
}
var r0 []*model.Product
var r1 error
if rf, ok := ret.Get(0).(func(string) ([]*model.Product, error)); ok {
@@ -595,6 +687,10 @@ func (_m *CloudInterface) GetSelfHostedProducts(userID string) ([]*model.Product
func (_m *CloudInterface) GetSubscription(userID string) (*model.Subscription, error) {
ret := _m.Called(userID)
if len(ret) == 0 {
panic("no return value specified for GetSubscription")
}
var r0 *model.Subscription
var r1 error
if rf, ok := ret.Get(0).(func(string) (*model.Subscription, error)); ok {
@@ -621,6 +717,10 @@ func (_m *CloudInterface) GetSubscription(userID string) (*model.Subscription, e
func (_m *CloudInterface) HandleLicenseChange() error {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for HandleLicenseChange")
}
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
@@ -635,6 +735,10 @@ func (_m *CloudInterface) HandleLicenseChange() error {
func (_m *CloudInterface) InvalidateCaches() error {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for InvalidateCaches")
}
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
@@ -649,6 +753,10 @@ func (_m *CloudInterface) InvalidateCaches() error {
func (_m *CloudInterface) RequestCloudTrial(userID string, subscriptionID string, newValidBusinessEmail string) (*model.Subscription, error) {
ret := _m.Called(userID, subscriptionID, newValidBusinessEmail)
if len(ret) == 0 {
panic("no return value specified for RequestCloudTrial")
}
var r0 *model.Subscription
var r1 error
if rf, ok := ret.Get(0).(func(string, string, string) (*model.Subscription, error)); ok {
@@ -675,6 +783,10 @@ func (_m *CloudInterface) RequestCloudTrial(userID string, subscriptionID string
func (_m *CloudInterface) SelfHostedSignupAvailable() error {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for SelfHostedSignupAvailable")
}
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
@@ -689,6 +801,10 @@ func (_m *CloudInterface) SelfHostedSignupAvailable() error {
func (_m *CloudInterface) SelfServeDeleteWorkspace(userID string, deletionRequest *model.WorkspaceDeletionRequest) error {
ret := _m.Called(userID, deletionRequest)
if len(ret) == 0 {
panic("no return value specified for SelfServeDeleteWorkspace")
}
var r0 error
if rf, ok := ret.Get(0).(func(string, *model.WorkspaceDeletionRequest) error); ok {
r0 = rf(userID, deletionRequest)
@@ -703,6 +819,10 @@ func (_m *CloudInterface) SelfServeDeleteWorkspace(userID string, deletionReques
func (_m *CloudInterface) SubmitTrueUpReview(userID string, trueUpReviewProfile map[string]interface{}) error {
ret := _m.Called(userID, trueUpReviewProfile)
if len(ret) == 0 {
panic("no return value specified for SubmitTrueUpReview")
}
var r0 error
if rf, ok := ret.Get(0).(func(string, map[string]interface{}) error); ok {
r0 = rf(userID, trueUpReviewProfile)
@@ -717,6 +837,10 @@ func (_m *CloudInterface) SubmitTrueUpReview(userID string, trueUpReviewProfile
func (_m *CloudInterface) SubscribeToNewsletter(userID string, req *model.SubscribeNewsletterRequest) error {
ret := _m.Called(userID, req)
if len(ret) == 0 {
panic("no return value specified for SubscribeToNewsletter")
}
var r0 error
if rf, ok := ret.Get(0).(func(string, *model.SubscribeNewsletterRequest) error); ok {
r0 = rf(userID, req)
@@ -731,6 +855,10 @@ func (_m *CloudInterface) SubscribeToNewsletter(userID string, req *model.Subscr
func (_m *CloudInterface) UpdateCloudCustomer(userID string, customerInfo *model.CloudCustomerInfo) (*model.CloudCustomer, error) {
ret := _m.Called(userID, customerInfo)
if len(ret) == 0 {
panic("no return value specified for UpdateCloudCustomer")
}
var r0 *model.CloudCustomer
var r1 error
if rf, ok := ret.Get(0).(func(string, *model.CloudCustomerInfo) (*model.CloudCustomer, error)); ok {
@@ -757,6 +885,10 @@ func (_m *CloudInterface) UpdateCloudCustomer(userID string, customerInfo *model
func (_m *CloudInterface) UpdateCloudCustomerAddress(userID string, address *model.Address) (*model.CloudCustomer, error) {
ret := _m.Called(userID, address)
if len(ret) == 0 {
panic("no return value specified for UpdateCloudCustomerAddress")
}
var r0 *model.CloudCustomer
var r1 error
if rf, ok := ret.Get(0).(func(string, *model.Address) (*model.CloudCustomer, error)); ok {
@@ -783,6 +915,10 @@ func (_m *CloudInterface) UpdateCloudCustomerAddress(userID string, address *mod
func (_m *CloudInterface) ValidateBusinessEmail(userID string, email string) error {
ret := _m.Called(userID, email)
if len(ret) == 0 {
panic("no return value specified for ValidateBusinessEmail")
}
var r0 error
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(userID, email)
@@ -793,13 +929,12 @@ func (_m *CloudInterface) ValidateBusinessEmail(userID string, email string) err
return r0
}
type mockConstructorTestingTNewCloudInterface interface {
// NewCloudInterface creates a new instance of CloudInterface. 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 NewCloudInterface(t interface {
mock.TestingT
Cleanup(func())
}
// NewCloudInterface creates a new instance of CloudInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewCloudInterface(t mockConstructorTestingTNewCloudInterface) *CloudInterface {
}) *CloudInterface {
mock := &CloudInterface{}
mock.Mock.Test(t)

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

@@ -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`.
@@ -20,6 +20,10 @@ type CloudJobInterface struct {
func (_m *CloudJobInterface) MakeScheduler() jobs.Scheduler {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for MakeScheduler")
}
var r0 jobs.Scheduler
if rf, ok := ret.Get(0).(func() jobs.Scheduler); ok {
r0 = rf()
@@ -36,6 +40,10 @@ func (_m *CloudJobInterface) MakeScheduler() jobs.Scheduler {
func (_m *CloudJobInterface) MakeWorker() model.Worker {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for MakeWorker")
}
var r0 model.Worker
if rf, ok := ret.Get(0).(func() model.Worker); ok {
r0 = rf()
@@ -48,13 +56,12 @@ func (_m *CloudJobInterface) MakeWorker() model.Worker {
return r0
}
type mockConstructorTestingTNewCloudJobInterface interface {
// NewCloudJobInterface creates a new instance of CloudJobInterface. 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 NewCloudJobInterface(t interface {
mock.TestingT
Cleanup(func())
}
// NewCloudJobInterface creates a new instance of CloudJobInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewCloudJobInterface(t mockConstructorTestingTNewCloudJobInterface) *CloudJobInterface {
}) *CloudJobInterface {
mock := &CloudJobInterface{}
mock.Mock.Test(t)

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

@@ -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`.
@@ -20,6 +20,10 @@ type ClusterInterface struct {
func (_m *ClusterInterface) ConfigChanged(previousConfig *model.Config, newConfig *model.Config, sendToOtherServer bool) *model.AppError {
ret := _m.Called(previousConfig, newConfig, sendToOtherServer)
if len(ret) == 0 {
panic("no return value specified for ConfigChanged")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(*model.Config, *model.Config, bool) *model.AppError); ok {
r0 = rf(previousConfig, newConfig, sendToOtherServer)
@@ -36,6 +40,10 @@ func (_m *ClusterInterface) ConfigChanged(previousConfig *model.Config, newConfi
func (_m *ClusterInterface) GetClusterId() string {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetClusterId")
}
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
@@ -50,6 +58,10 @@ func (_m *ClusterInterface) GetClusterId() string {
func (_m *ClusterInterface) GetClusterInfos() []*model.ClusterInfo {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetClusterInfos")
}
var r0 []*model.ClusterInfo
if rf, ok := ret.Get(0).(func() []*model.ClusterInfo); ok {
r0 = rf()
@@ -66,6 +78,10 @@ func (_m *ClusterInterface) GetClusterInfos() []*model.ClusterInfo {
func (_m *ClusterInterface) GetClusterStats() ([]*model.ClusterStats, *model.AppError) {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetClusterStats")
}
var r0 []*model.ClusterStats
var r1 *model.AppError
if rf, ok := ret.Get(0).(func() ([]*model.ClusterStats, *model.AppError)); ok {
@@ -94,6 +110,10 @@ func (_m *ClusterInterface) GetClusterStats() ([]*model.ClusterStats, *model.App
func (_m *ClusterInterface) GetLogs(page int, perPage int) ([]string, *model.AppError) {
ret := _m.Called(page, perPage)
if len(ret) == 0 {
panic("no return value specified for GetLogs")
}
var r0 []string
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(int, int) ([]string, *model.AppError)); ok {
@@ -122,6 +142,10 @@ func (_m *ClusterInterface) GetLogs(page int, perPage int) ([]string, *model.App
func (_m *ClusterInterface) GetMyClusterInfo() *model.ClusterInfo {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetMyClusterInfo")
}
var r0 *model.ClusterInfo
if rf, ok := ret.Get(0).(func() *model.ClusterInfo); ok {
r0 = rf()
@@ -138,6 +162,10 @@ func (_m *ClusterInterface) GetMyClusterInfo() *model.ClusterInfo {
func (_m *ClusterInterface) GetPluginStatuses() (model.PluginStatuses, *model.AppError) {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetPluginStatuses")
}
var r0 model.PluginStatuses
var r1 *model.AppError
if rf, ok := ret.Get(0).(func() (model.PluginStatuses, *model.AppError)); ok {
@@ -166,6 +194,10 @@ func (_m *ClusterInterface) GetPluginStatuses() (model.PluginStatuses, *model.Ap
func (_m *ClusterInterface) HealthScore() int {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for HealthScore")
}
var r0 int
if rf, ok := ret.Get(0).(func() int); ok {
r0 = rf()
@@ -180,6 +212,10 @@ func (_m *ClusterInterface) HealthScore() int {
func (_m *ClusterInterface) 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()
@@ -199,6 +235,10 @@ func (_m *ClusterInterface) NotifyMsg(buf []byte) {
func (_m *ClusterInterface) QueryLogs(page int, perPage int) (map[string][]string, *model.AppError) {
ret := _m.Called(page, perPage)
if len(ret) == 0 {
panic("no return value specified for QueryLogs")
}
var r0 map[string][]string
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(int, int) (map[string][]string, *model.AppError)); ok {
@@ -237,6 +277,10 @@ func (_m *ClusterInterface) SendClusterMessage(msg *model.ClusterMessage) {
func (_m *ClusterInterface) SendClusterMessageToNode(nodeID string, msg *model.ClusterMessage) error {
ret := _m.Called(nodeID, msg)
if len(ret) == 0 {
panic("no return value specified for SendClusterMessageToNode")
}
var r0 error
if rf, ok := ret.Get(0).(func(string, *model.ClusterMessage) error); ok {
r0 = rf(nodeID, msg)
@@ -257,13 +301,12 @@ func (_m *ClusterInterface) StopInterNodeCommunication() {
_m.Called()
}
type mockConstructorTestingTNewClusterInterface interface {
// NewClusterInterface creates a new instance of ClusterInterface. 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 NewClusterInterface(t interface {
mock.TestingT
Cleanup(func())
}
// NewClusterInterface creates a new instance of ClusterInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewClusterInterface(t mockConstructorTestingTNewClusterInterface) *ClusterInterface {
}) *ClusterInterface {
mock := &ClusterInterface{}
mock.Mock.Test(t)

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

@@ -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,13 +19,12 @@ func (_m *ClusterMessageHandler) Execute(msg *model.ClusterMessage) {
_m.Called(msg)
}
type mockConstructorTestingTNewClusterMessageHandler interface {
// NewClusterMessageHandler creates a new instance of ClusterMessageHandler. 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 NewClusterMessageHandler(t interface {
mock.TestingT
Cleanup(func())
}
// NewClusterMessageHandler creates a new instance of ClusterMessageHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewClusterMessageHandler(t mockConstructorTestingTNewClusterMessageHandler) *ClusterMessageHandler {
}) *ClusterMessageHandler {
mock := &ClusterMessageHandler{}
mock.Mock.Test(t)

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

@@ -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 ComplianceInterface struct {
func (_m *ComplianceInterface) RunComplianceJob(rctx request.CTX, job *model.Compliance) *model.AppError {
ret := _m.Called(rctx, job)
if len(ret) == 0 {
panic("no return value specified for RunComplianceJob")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, *model.Compliance) *model.AppError); ok {
r0 = rf(rctx, job)
@@ -36,13 +40,12 @@ func (_m *ComplianceInterface) StartComplianceDailyJob() {
_m.Called()
}
type mockConstructorTestingTNewComplianceInterface interface {
// NewComplianceInterface creates a new instance of ComplianceInterface. 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 NewComplianceInterface(t interface {
mock.TestingT
Cleanup(func())
}
// NewComplianceInterface creates a new instance of ComplianceInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewComplianceInterface(t mockConstructorTestingTNewComplianceInterface) *ComplianceInterface {
}) *ComplianceInterface {
mock := &ComplianceInterface{}
mock.Mock.Test(t)

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

@@ -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`.
@@ -18,6 +18,10 @@ type DataRetentionInterface struct {
func (_m *DataRetentionInterface) AddChannelsToPolicy(policyID string, channelIDs []string) *model.AppError {
ret := _m.Called(policyID, channelIDs)
if len(ret) == 0 {
panic("no return value specified for AddChannelsToPolicy")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(string, []string) *model.AppError); ok {
r0 = rf(policyID, channelIDs)
@@ -34,6 +38,10 @@ func (_m *DataRetentionInterface) AddChannelsToPolicy(policyID string, channelID
func (_m *DataRetentionInterface) AddTeamsToPolicy(policyID string, teamIDs []string) *model.AppError {
ret := _m.Called(policyID, teamIDs)
if len(ret) == 0 {
panic("no return value specified for AddTeamsToPolicy")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(string, []string) *model.AppError); ok {
r0 = rf(policyID, teamIDs)
@@ -50,6 +58,10 @@ func (_m *DataRetentionInterface) AddTeamsToPolicy(policyID string, teamIDs []st
func (_m *DataRetentionInterface) CreatePolicy(policy *model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError) {
ret := _m.Called(policy)
if len(ret) == 0 {
panic("no return value specified for CreatePolicy")
}
var r0 *model.RetentionPolicyWithTeamAndChannelCounts
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(*model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError)); ok {
@@ -78,6 +90,10 @@ func (_m *DataRetentionInterface) CreatePolicy(policy *model.RetentionPolicyWith
func (_m *DataRetentionInterface) DeletePolicy(policyID string) *model.AppError {
ret := _m.Called(policyID)
if len(ret) == 0 {
panic("no return value specified for DeletePolicy")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
r0 = rf(policyID)
@@ -94,6 +110,10 @@ func (_m *DataRetentionInterface) DeletePolicy(policyID string) *model.AppError
func (_m *DataRetentionInterface) GetChannelPoliciesForUser(userID string, offset int, limit int) (*model.RetentionPolicyForChannelList, *model.AppError) {
ret := _m.Called(userID, offset, limit)
if len(ret) == 0 {
panic("no return value specified for GetChannelPoliciesForUser")
}
var r0 *model.RetentionPolicyForChannelList
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, int, int) (*model.RetentionPolicyForChannelList, *model.AppError)); ok {
@@ -122,6 +142,10 @@ func (_m *DataRetentionInterface) GetChannelPoliciesForUser(userID string, offse
func (_m *DataRetentionInterface) GetChannelsForPolicy(policyID string, offset int, limit int) (*model.ChannelsWithCount, *model.AppError) {
ret := _m.Called(policyID, offset, limit)
if len(ret) == 0 {
panic("no return value specified for GetChannelsForPolicy")
}
var r0 *model.ChannelsWithCount
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, int, int) (*model.ChannelsWithCount, *model.AppError)); ok {
@@ -150,6 +174,10 @@ func (_m *DataRetentionInterface) GetChannelsForPolicy(policyID string, offset i
func (_m *DataRetentionInterface) GetGlobalPolicy() (*model.GlobalRetentionPolicy, *model.AppError) {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetGlobalPolicy")
}
var r0 *model.GlobalRetentionPolicy
var r1 *model.AppError
if rf, ok := ret.Get(0).(func() (*model.GlobalRetentionPolicy, *model.AppError)); ok {
@@ -178,6 +206,10 @@ func (_m *DataRetentionInterface) GetGlobalPolicy() (*model.GlobalRetentionPolic
func (_m *DataRetentionInterface) GetPolicies(offset int, limit int) (*model.RetentionPolicyWithTeamAndChannelCountsList, *model.AppError) {
ret := _m.Called(offset, limit)
if len(ret) == 0 {
panic("no return value specified for GetPolicies")
}
var r0 *model.RetentionPolicyWithTeamAndChannelCountsList
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(int, int) (*model.RetentionPolicyWithTeamAndChannelCountsList, *model.AppError)); ok {
@@ -206,6 +238,10 @@ func (_m *DataRetentionInterface) GetPolicies(offset int, limit int) (*model.Ret
func (_m *DataRetentionInterface) GetPoliciesCount() (int64, *model.AppError) {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetPoliciesCount")
}
var r0 int64
var r1 *model.AppError
if rf, ok := ret.Get(0).(func() (int64, *model.AppError)); ok {
@@ -232,6 +268,10 @@ func (_m *DataRetentionInterface) GetPoliciesCount() (int64, *model.AppError) {
func (_m *DataRetentionInterface) GetPolicy(policyID string) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError) {
ret := _m.Called(policyID)
if len(ret) == 0 {
panic("no return value specified for GetPolicy")
}
var r0 *model.RetentionPolicyWithTeamAndChannelCounts
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError)); ok {
@@ -260,6 +300,10 @@ func (_m *DataRetentionInterface) GetPolicy(policyID string) (*model.RetentionPo
func (_m *DataRetentionInterface) GetTeamPoliciesForUser(userID string, offset int, limit int) (*model.RetentionPolicyForTeamList, *model.AppError) {
ret := _m.Called(userID, offset, limit)
if len(ret) == 0 {
panic("no return value specified for GetTeamPoliciesForUser")
}
var r0 *model.RetentionPolicyForTeamList
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, int, int) (*model.RetentionPolicyForTeamList, *model.AppError)); ok {
@@ -288,6 +332,10 @@ func (_m *DataRetentionInterface) GetTeamPoliciesForUser(userID string, offset i
func (_m *DataRetentionInterface) GetTeamsForPolicy(policyID string, offset int, limit int) (*model.TeamsWithCount, *model.AppError) {
ret := _m.Called(policyID, offset, limit)
if len(ret) == 0 {
panic("no return value specified for GetTeamsForPolicy")
}
var r0 *model.TeamsWithCount
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, int, int) (*model.TeamsWithCount, *model.AppError)); ok {
@@ -316,6 +364,10 @@ func (_m *DataRetentionInterface) GetTeamsForPolicy(policyID string, offset int,
func (_m *DataRetentionInterface) PatchPolicy(patch *model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError) {
ret := _m.Called(patch)
if len(ret) == 0 {
panic("no return value specified for PatchPolicy")
}
var r0 *model.RetentionPolicyWithTeamAndChannelCounts
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(*model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError)); ok {
@@ -344,6 +396,10 @@ func (_m *DataRetentionInterface) PatchPolicy(patch *model.RetentionPolicyWithTe
func (_m *DataRetentionInterface) RemoveChannelsFromPolicy(policyID string, channelIDs []string) *model.AppError {
ret := _m.Called(policyID, channelIDs)
if len(ret) == 0 {
panic("no return value specified for RemoveChannelsFromPolicy")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(string, []string) *model.AppError); ok {
r0 = rf(policyID, channelIDs)
@@ -360,6 +416,10 @@ func (_m *DataRetentionInterface) RemoveChannelsFromPolicy(policyID string, chan
func (_m *DataRetentionInterface) RemoveTeamsFromPolicy(policyID string, teamIDs []string) *model.AppError {
ret := _m.Called(policyID, teamIDs)
if len(ret) == 0 {
panic("no return value specified for RemoveTeamsFromPolicy")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(string, []string) *model.AppError); ok {
r0 = rf(policyID, teamIDs)
@@ -372,13 +432,12 @@ func (_m *DataRetentionInterface) RemoveTeamsFromPolicy(policyID string, teamIDs
return r0
}
type mockConstructorTestingTNewDataRetentionInterface interface {
// NewDataRetentionInterface creates a new instance of DataRetentionInterface. 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 NewDataRetentionInterface(t interface {
mock.TestingT
Cleanup(func())
}
// NewDataRetentionInterface creates a new instance of DataRetentionInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewDataRetentionInterface(t mockConstructorTestingTNewDataRetentionInterface) *DataRetentionInterface {
}) *DataRetentionInterface {
mock := &DataRetentionInterface{}
mock.Mock.Test(t)

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

@@ -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`.
@@ -20,6 +20,10 @@ type DataRetentionJobInterface struct {
func (_m *DataRetentionJobInterface) MakeScheduler() jobs.Scheduler {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for MakeScheduler")
}
var r0 jobs.Scheduler
if rf, ok := ret.Get(0).(func() jobs.Scheduler); ok {
r0 = rf()
@@ -36,6 +40,10 @@ func (_m *DataRetentionJobInterface) MakeScheduler() jobs.Scheduler {
func (_m *DataRetentionJobInterface) MakeWorker() model.Worker {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for MakeWorker")
}
var r0 model.Worker
if rf, ok := ret.Get(0).(func() model.Worker); ok {
r0 = rf()
@@ -48,13 +56,12 @@ func (_m *DataRetentionJobInterface) MakeWorker() model.Worker {
return r0
}
type mockConstructorTestingTNewDataRetentionJobInterface interface {
// NewDataRetentionJobInterface creates a new instance of DataRetentionJobInterface. 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 NewDataRetentionJobInterface(t interface {
mock.TestingT
Cleanup(func())
}
// NewDataRetentionJobInterface creates a new instance of DataRetentionJobInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewDataRetentionJobInterface(t mockConstructorTestingTNewDataRetentionJobInterface) *DataRetentionJobInterface {
}) *DataRetentionJobInterface {
mock := &DataRetentionJobInterface{}
mock.Mock.Test(t)

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

@@ -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`.
@@ -20,6 +20,10 @@ type ElasticsearchAggregatorInterface struct {
func (_m *ElasticsearchAggregatorInterface) MakeScheduler() jobs.Scheduler {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for MakeScheduler")
}
var r0 jobs.Scheduler
if rf, ok := ret.Get(0).(func() jobs.Scheduler); ok {
r0 = rf()
@@ -36,6 +40,10 @@ func (_m *ElasticsearchAggregatorInterface) MakeScheduler() jobs.Scheduler {
func (_m *ElasticsearchAggregatorInterface) MakeWorker() model.Worker {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for MakeWorker")
}
var r0 model.Worker
if rf, ok := ret.Get(0).(func() model.Worker); ok {
r0 = rf()
@@ -48,13 +56,12 @@ func (_m *ElasticsearchAggregatorInterface) MakeWorker() model.Worker {
return r0
}
type mockConstructorTestingTNewElasticsearchAggregatorInterface interface {
// NewElasticsearchAggregatorInterface creates a new instance of ElasticsearchAggregatorInterface. 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 NewElasticsearchAggregatorInterface(t interface {
mock.TestingT
Cleanup(func())
}
// NewElasticsearchAggregatorInterface creates a new instance of ElasticsearchAggregatorInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewElasticsearchAggregatorInterface(t mockConstructorTestingTNewElasticsearchAggregatorInterface) *ElasticsearchAggregatorInterface {
}) *ElasticsearchAggregatorInterface {
mock := &ElasticsearchAggregatorInterface{}
mock.Mock.Test(t)

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

@@ -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`.
@@ -18,6 +18,10 @@ type ElasticsearchIndexerInterface struct {
func (_m *ElasticsearchIndexerInterface) MakeWorker() model.Worker {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for MakeWorker")
}
var r0 model.Worker
if rf, ok := ret.Get(0).(func() model.Worker); ok {
r0 = rf()
@@ -30,13 +34,12 @@ func (_m *ElasticsearchIndexerInterface) MakeWorker() model.Worker {
return r0
}
type mockConstructorTestingTNewElasticsearchIndexerInterface interface {
// NewElasticsearchIndexerInterface creates a new instance of ElasticsearchIndexerInterface. 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 NewElasticsearchIndexerInterface(t interface {
mock.TestingT
Cleanup(func())
}
// NewElasticsearchIndexerInterface creates a new instance of ElasticsearchIndexerInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewElasticsearchIndexerInterface(t mockConstructorTestingTNewElasticsearchIndexerInterface) *ElasticsearchIndexerInterface {
}) *ElasticsearchIndexerInterface {
mock := &ElasticsearchIndexerInterface{}
mock.Mock.Test(t)

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

@@ -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`.
@@ -18,6 +18,10 @@ type IPFilteringInterface struct {
func (_m *IPFilteringInterface) ApplyIPFilters(allowedIPRanges *model.AllowedIPRanges) (*model.AllowedIPRanges, error) {
ret := _m.Called(allowedIPRanges)
if len(ret) == 0 {
panic("no return value specified for ApplyIPFilters")
}
var r0 *model.AllowedIPRanges
var r1 error
if rf, ok := ret.Get(0).(func(*model.AllowedIPRanges) (*model.AllowedIPRanges, error)); ok {
@@ -44,6 +48,10 @@ func (_m *IPFilteringInterface) ApplyIPFilters(allowedIPRanges *model.AllowedIPR
func (_m *IPFilteringInterface) GetIPFilters() (*model.AllowedIPRanges, error) {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetIPFilters")
}
var r0 *model.AllowedIPRanges
var r1 error
if rf, ok := ret.Get(0).(func() (*model.AllowedIPRanges, error)); ok {
@@ -66,13 +74,12 @@ func (_m *IPFilteringInterface) GetIPFilters() (*model.AllowedIPRanges, error) {
return r0, r1
}
type mockConstructorTestingTNewIPFilteringInterface interface {
// NewIPFilteringInterface creates a new instance of IPFilteringInterface. 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 NewIPFilteringInterface(t interface {
mock.TestingT
Cleanup(func())
}
// NewIPFilteringInterface creates a new instance of IPFilteringInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewIPFilteringInterface(t mockConstructorTestingTNewIPFilteringInterface) *IPFilteringInterface {
}) *IPFilteringInterface {
mock := &IPFilteringInterface{}
mock.Mock.Test(t)

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

@@ -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`.
@@ -18,6 +18,10 @@ type IndexerJobInterface struct {
func (_m *IndexerJobInterface) MakeWorker() model.Worker {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for MakeWorker")
}
var r0 model.Worker
if rf, ok := ret.Get(0).(func() model.Worker); ok {
r0 = rf()
@@ -30,13 +34,12 @@ func (_m *IndexerJobInterface) MakeWorker() model.Worker {
return r0
}
type mockConstructorTestingTNewIndexerJobInterface interface {
// NewIndexerJobInterface creates a new instance of IndexerJobInterface. 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 NewIndexerJobInterface(t interface {
mock.TestingT
Cleanup(func())
}
// NewIndexerJobInterface creates a new instance of IndexerJobInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewIndexerJobInterface(t mockConstructorTestingTNewIndexerJobInterface) *IndexerJobInterface {
}) *IndexerJobInterface {
mock := &IndexerJobInterface{}
mock.Mock.Test(t)

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

@@ -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 LdapInterface struct {
func (_m *LdapInterface) CheckPassword(c request.CTX, id string, password string) *model.AppError {
ret := _m.Called(c, id, password)
if len(ret) == 0 {
panic("no return value specified for CheckPassword")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string, string) *model.AppError); ok {
r0 = rf(c, id, password)
@@ -35,6 +39,10 @@ func (_m *LdapInterface) CheckPassword(c request.CTX, id string, password string
func (_m *LdapInterface) CheckPasswordAuthData(c request.CTX, authData string, password string) *model.AppError {
ret := _m.Called(c, authData, password)
if len(ret) == 0 {
panic("no return value specified for CheckPasswordAuthData")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string, string) *model.AppError); ok {
r0 = rf(c, authData, password)
@@ -51,6 +59,10 @@ func (_m *LdapInterface) CheckPasswordAuthData(c request.CTX, authData string, p
func (_m *LdapInterface) CheckProviderAttributes(c request.CTX, LS *model.LdapSettings, ouser *model.User, patch *model.UserPatch) string {
ret := _m.Called(c, LS, 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.LdapSettings, *model.User, *model.UserPatch) string); ok {
r0 = rf(c, LS, ouser, patch)
@@ -65,6 +77,10 @@ func (_m *LdapInterface) CheckProviderAttributes(c request.CTX, LS *model.LdapSe
func (_m *LdapInterface) DoLogin(c request.CTX, id string, password string) (*model.User, *model.AppError) {
ret := _m.Called(c, id, password)
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, string) (*model.User, *model.AppError)); ok {
@@ -93,6 +109,10 @@ func (_m *LdapInterface) DoLogin(c request.CTX, id string, password string) (*mo
func (_m *LdapInterface) FirstLoginSync(c request.CTX, user *model.User, userAuthService string, userAuthData string, email string) *model.AppError {
ret := _m.Called(c, user, userAuthService, userAuthData, email)
if len(ret) == 0 {
panic("no return value specified for FirstLoginSync")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, *model.User, string, string, string) *model.AppError); ok {
r0 = rf(c, user, userAuthService, userAuthData, email)
@@ -109,6 +129,10 @@ func (_m *LdapInterface) FirstLoginSync(c request.CTX, user *model.User, userAut
func (_m *LdapInterface) GetADLdapIdFromSAMLId(c request.CTX, authData string) string {
ret := _m.Called(c, authData)
if len(ret) == 0 {
panic("no return value specified for GetADLdapIdFromSAMLId")
}
var r0 string
if rf, ok := ret.Get(0).(func(request.CTX, string) string); ok {
r0 = rf(c, authData)
@@ -123,6 +147,10 @@ func (_m *LdapInterface) GetADLdapIdFromSAMLId(c request.CTX, authData string) s
func (_m *LdapInterface) GetAllGroupsPage(rctx request.CTX, page int, perPage int, opts model.LdapGroupSearchOpts) ([]*model.Group, int, *model.AppError) {
ret := _m.Called(rctx, page, perPage, opts)
if len(ret) == 0 {
panic("no return value specified for GetAllGroupsPage")
}
var r0 []*model.Group
var r1 int
var r2 *model.AppError
@@ -158,6 +186,10 @@ func (_m *LdapInterface) GetAllGroupsPage(rctx request.CTX, page int, perPage in
func (_m *LdapInterface) GetAllLdapUsers(c request.CTX) ([]*model.User, *model.AppError) {
ret := _m.Called(c)
if len(ret) == 0 {
panic("no return value specified for GetAllLdapUsers")
}
var r0 []*model.User
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX) ([]*model.User, *model.AppError)); ok {
@@ -186,6 +218,10 @@ func (_m *LdapInterface) GetAllLdapUsers(c request.CTX) ([]*model.User, *model.A
func (_m *LdapInterface) GetGroup(rctx request.CTX, groupUID string) (*model.Group, *model.AppError) {
ret := _m.Called(rctx, groupUID)
if len(ret) == 0 {
panic("no return value specified for GetGroup")
}
var r0 *model.Group
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.Group, *model.AppError)); ok {
@@ -214,6 +250,10 @@ func (_m *LdapInterface) GetGroup(rctx request.CTX, groupUID string) (*model.Gro
func (_m *LdapInterface) GetSAMLIdFromADLdapId(c request.CTX, authData string) string {
ret := _m.Called(c, authData)
if len(ret) == 0 {
panic("no return value specified for GetSAMLIdFromADLdapId")
}
var r0 string
if rf, ok := ret.Get(0).(func(request.CTX, string) string); ok {
r0 = rf(c, authData)
@@ -228,6 +268,10 @@ func (_m *LdapInterface) GetSAMLIdFromADLdapId(c request.CTX, authData string) s
func (_m *LdapInterface) GetUser(c request.CTX, id string) (*model.User, *model.AppError) {
ret := _m.Called(c, id)
if len(ret) == 0 {
panic("no return value specified for GetUser")
}
var r0 *model.User
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.User, *model.AppError)); ok {
@@ -256,6 +300,10 @@ func (_m *LdapInterface) GetUser(c request.CTX, id string) (*model.User, *model.
func (_m *LdapInterface) GetUserAttributes(rctx request.CTX, id string, attributes []string) (map[string]string, *model.AppError) {
ret := _m.Called(rctx, id, attributes)
if len(ret) == 0 {
panic("no return value specified for GetUserAttributes")
}
var r0 map[string]string
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string, []string) (map[string]string, *model.AppError)); ok {
@@ -284,6 +332,10 @@ func (_m *LdapInterface) GetUserAttributes(rctx request.CTX, id string, attribut
func (_m *LdapInterface) GetVendorNameAndVendorVersion(rctx request.CTX) (string, string) {
ret := _m.Called(rctx)
if len(ret) == 0 {
panic("no return value specified for GetVendorNameAndVendorVersion")
}
var r0 string
var r1 string
if rf, ok := ret.Get(0).(func(request.CTX) (string, string)); ok {
@@ -308,6 +360,10 @@ func (_m *LdapInterface) GetVendorNameAndVendorVersion(rctx request.CTX) (string
func (_m *LdapInterface) MigrateIDAttribute(c request.CTX, toAttribute string) error {
ret := _m.Called(c, toAttribute)
if len(ret) == 0 {
panic("no return value specified for MigrateIDAttribute")
}
var r0 error
if rf, ok := ret.Get(0).(func(request.CTX, string) error); ok {
r0 = rf(c, toAttribute)
@@ -322,6 +378,10 @@ func (_m *LdapInterface) MigrateIDAttribute(c request.CTX, toAttribute string) e
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)
@@ -338,6 +398,10 @@ func (_m *LdapInterface) RunTest(rctx request.CTX) *model.AppError {
func (_m *LdapInterface) StartSynchronizeJob(c request.CTX, waitForJobToFinish bool, includeRemovedMembers bool) (*model.Job, *model.AppError) {
ret := _m.Called(c, waitForJobToFinish, includeRemovedMembers)
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, bool, bool) (*model.Job, *model.AppError)); ok {
@@ -366,6 +430,10 @@ func (_m *LdapInterface) StartSynchronizeJob(c request.CTX, waitForJobToFinish b
func (_m *LdapInterface) SwitchToLdap(c request.CTX, userID string, ldapID string, ldapPassword string) *model.AppError {
ret := _m.Called(c, userID, ldapID, ldapPassword)
if len(ret) == 0 {
panic("no return value specified for SwitchToLdap")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string, string, string) *model.AppError); ok {
r0 = rf(c, userID, ldapID, ldapPassword)
@@ -383,13 +451,12 @@ func (_m *LdapInterface) UpdateProfilePictureIfNecessary(_a0 request.CTX, _a1 mo
_m.Called(_a0, _a1, _a2)
}
type mockConstructorTestingTNewLdapInterface interface {
// NewLdapInterface creates a new instance of LdapInterface. 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 NewLdapInterface(t interface {
mock.TestingT
Cleanup(func())
}
// NewLdapInterface creates a new instance of LdapInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewLdapInterface(t mockConstructorTestingTNewLdapInterface) *LdapInterface {
}) *LdapInterface {
mock := &LdapInterface{}
mock.Mock.Test(t)

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

@@ -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`.
@@ -20,6 +20,10 @@ type LdapSyncInterface struct {
func (_m *LdapSyncInterface) MakeScheduler() jobs.Scheduler {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for MakeScheduler")
}
var r0 jobs.Scheduler
if rf, ok := ret.Get(0).(func() jobs.Scheduler); ok {
r0 = rf()
@@ -36,6 +40,10 @@ func (_m *LdapSyncInterface) MakeScheduler() jobs.Scheduler {
func (_m *LdapSyncInterface) MakeWorker() model.Worker {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for MakeWorker")
}
var r0 model.Worker
if rf, ok := ret.Get(0).(func() model.Worker); ok {
r0 = rf()
@@ -48,13 +56,12 @@ func (_m *LdapSyncInterface) MakeWorker() model.Worker {
return r0
}
type mockConstructorTestingTNewLdapSyncInterface interface {
// NewLdapSyncInterface creates a new instance of LdapSyncInterface. 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 NewLdapSyncInterface(t interface {
mock.TestingT
Cleanup(func())
}
// NewLdapSyncInterface creates a new instance of LdapSyncInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewLdapSyncInterface(t mockConstructorTestingTNewLdapSyncInterface) *LdapSyncInterface {
}) *LdapSyncInterface {
mock := &LdapSyncInterface{}
mock.Mock.Test(t)

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

@@ -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`.
@@ -18,6 +18,10 @@ type LicenseInterface struct {
func (_m *LicenseInterface) CanStartTrial() (bool, error) {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for CanStartTrial")
}
var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func() (bool, error)); ok {
@@ -42,6 +46,10 @@ func (_m *LicenseInterface) CanStartTrial() (bool, error) {
func (_m *LicenseInterface) GetPrevTrial() (*model.License, error) {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetPrevTrial")
}
var r0 *model.License
var r1 error
if rf, ok := ret.Get(0).(func() (*model.License, error)); ok {
@@ -64,13 +72,12 @@ func (_m *LicenseInterface) GetPrevTrial() (*model.License, error) {
return r0, r1
}
type mockConstructorTestingTNewLicenseInterface interface {
// NewLicenseInterface creates a new instance of LicenseInterface. 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 NewLicenseInterface(t interface {
mock.TestingT
Cleanup(func())
}
// NewLicenseInterface creates a new instance of LicenseInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewLicenseInterface(t mockConstructorTestingTNewLicenseInterface) *LicenseInterface {
}) *LicenseInterface {
mock := &LicenseInterface{}
mock.Mock.Test(t)

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

@@ -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)

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

@@ -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`.
@@ -20,6 +20,10 @@ type MessageExportJobInterface struct {
func (_m *MessageExportJobInterface) MakeScheduler() jobs.Scheduler {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for MakeScheduler")
}
var r0 jobs.Scheduler
if rf, ok := ret.Get(0).(func() jobs.Scheduler); ok {
r0 = rf()
@@ -36,6 +40,10 @@ func (_m *MessageExportJobInterface) MakeScheduler() jobs.Scheduler {
func (_m *MessageExportJobInterface) MakeWorker() model.Worker {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for MakeWorker")
}
var r0 model.Worker
if rf, ok := ret.Get(0).(func() model.Worker); ok {
r0 = rf()
@@ -48,13 +56,12 @@ func (_m *MessageExportJobInterface) MakeWorker() model.Worker {
return r0
}
type mockConstructorTestingTNewMessageExportJobInterface interface {
// NewMessageExportJobInterface creates a new instance of MessageExportJobInterface. 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 NewMessageExportJobInterface(t interface {
mock.TestingT
Cleanup(func())
}
// NewMessageExportJobInterface creates a new instance of MessageExportJobInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMessageExportJobInterface(t mockConstructorTestingTNewMessageExportJobInterface) *MessageExportJobInterface {
}) *MessageExportJobInterface {
mock := &MessageExportJobInterface{}
mock.Mock.Test(t)

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

@@ -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`.
@@ -47,6 +47,10 @@ func (_m *MetricsInterface) DecrementWebSocketBroadcastUsersRegistered(hub strin
func (_m *MetricsInterface) GetLoggerMetricsCollector() logr.MetricsCollector {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetLoggerMetricsCollector")
}
var r0 logr.MetricsCollector
if rf, ok := ret.Get(0).(func() logr.MetricsCollector); ok {
r0 = rf()
@@ -359,13 +363,12 @@ func (_m *MetricsInterface) UnregisterDBCollector(db *sql.DB, name string) {
_m.Called(db, name)
}
type mockConstructorTestingTNewMetricsInterface interface {
// NewMetricsInterface creates a new instance of MetricsInterface. 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 NewMetricsInterface(t interface {
mock.TestingT
Cleanup(func())
}
// NewMetricsInterface creates a new instance of MetricsInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMetricsInterface(t mockConstructorTestingTNewMetricsInterface) *MetricsInterface {
}) *MetricsInterface {
mock := &MetricsInterface{}
mock.Mock.Test(t)

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

@@ -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)

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

@@ -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`.
@@ -22,6 +22,10 @@ type OAuthProvider struct {
func (_m *OAuthProvider) GetSSOSettings(c request.CTX, config *model.Config, service string) (*model.SSOSettings, error) {
ret := _m.Called(c, config, service)
if len(ret) == 0 {
panic("no return value specified for GetSSOSettings")
}
var r0 *model.SSOSettings
var r1 error
if rf, ok := ret.Get(0).(func(request.CTX, *model.Config, string) (*model.SSOSettings, error)); ok {
@@ -48,6 +52,10 @@ func (_m *OAuthProvider) GetSSOSettings(c request.CTX, config *model.Config, ser
func (_m *OAuthProvider) GetUserFromIdToken(c request.CTX, idToken string) (*model.User, error) {
ret := _m.Called(c, idToken)
if len(ret) == 0 {
panic("no return value specified for GetUserFromIdToken")
}
var r0 *model.User
var r1 error
if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.User, error)); ok {
@@ -74,6 +82,10 @@ func (_m *OAuthProvider) GetUserFromIdToken(c request.CTX, idToken string) (*mod
func (_m *OAuthProvider) GetUserFromJSON(c request.CTX, data io.Reader, tokenUser *model.User) (*model.User, error) {
ret := _m.Called(c, data, tokenUser)
if len(ret) == 0 {
panic("no return value specified for GetUserFromJSON")
}
var r0 *model.User
var r1 error
if rf, ok := ret.Get(0).(func(request.CTX, io.Reader, *model.User) (*model.User, error)); ok {
@@ -100,6 +112,10 @@ func (_m *OAuthProvider) GetUserFromJSON(c request.CTX, data io.Reader, tokenUse
func (_m *OAuthProvider) IsSameUser(c request.CTX, dbUser *model.User, oAuthUser *model.User) bool {
ret := _m.Called(c, dbUser, oAuthUser)
if len(ret) == 0 {
panic("no return value specified for IsSameUser")
}
var r0 bool
if rf, ok := ret.Get(0).(func(request.CTX, *model.User, *model.User) bool); ok {
r0 = rf(c, dbUser, oAuthUser)
@@ -110,13 +126,12 @@ func (_m *OAuthProvider) IsSameUser(c request.CTX, dbUser *model.User, oAuthUser
return r0
}
type mockConstructorTestingTNewOAuthProvider interface {
// NewOAuthProvider creates a new instance of OAuthProvider. 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 NewOAuthProvider(t interface {
mock.TestingT
Cleanup(func())
}
// NewOAuthProvider creates a new instance of OAuthProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewOAuthProvider(t mockConstructorTestingTNewOAuthProvider) *OAuthProvider {
}) *OAuthProvider {
mock := &OAuthProvider{}
mock.Mock.Test(t)

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

@@ -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 OutgoingOAuthConnectionInterface struct {
func (_m *OutgoingOAuthConnectionInterface) DeleteConnection(rctx request.CTX, id string) *model.AppError {
ret := _m.Called(rctx, id)
if len(ret) == 0 {
panic("no return value specified for DeleteConnection")
}
var r0 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string) *model.AppError); ok {
r0 = rf(rctx, id)
@@ -35,6 +39,10 @@ func (_m *OutgoingOAuthConnectionInterface) DeleteConnection(rctx request.CTX, i
func (_m *OutgoingOAuthConnectionInterface) GetConnection(rctx request.CTX, id string) (*model.OutgoingOAuthConnection, *model.AppError) {
ret := _m.Called(rctx, id)
if len(ret) == 0 {
panic("no return value specified for GetConnection")
}
var r0 *model.OutgoingOAuthConnection
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.OutgoingOAuthConnection, *model.AppError)); ok {
@@ -63,6 +71,10 @@ func (_m *OutgoingOAuthConnectionInterface) GetConnection(rctx request.CTX, id s
func (_m *OutgoingOAuthConnectionInterface) GetConnectionForAudience(rctx request.CTX, url string) (*model.OutgoingOAuthConnection, *model.AppError) {
ret := _m.Called(rctx, url)
if len(ret) == 0 {
panic("no return value specified for GetConnectionForAudience")
}
var r0 *model.OutgoingOAuthConnection
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.OutgoingOAuthConnection, *model.AppError)); ok {
@@ -91,6 +103,10 @@ func (_m *OutgoingOAuthConnectionInterface) GetConnectionForAudience(rctx reques
func (_m *OutgoingOAuthConnectionInterface) GetConnections(rctx request.CTX, filters model.OutgoingOAuthConnectionGetConnectionsFilter) ([]*model.OutgoingOAuthConnection, *model.AppError) {
ret := _m.Called(rctx, filters)
if len(ret) == 0 {
panic("no return value specified for GetConnections")
}
var r0 []*model.OutgoingOAuthConnection
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, model.OutgoingOAuthConnectionGetConnectionsFilter) ([]*model.OutgoingOAuthConnection, *model.AppError)); ok {
@@ -119,6 +135,10 @@ func (_m *OutgoingOAuthConnectionInterface) GetConnections(rctx request.CTX, fil
func (_m *OutgoingOAuthConnectionInterface) RetrieveTokenForConnection(rctx request.CTX, conn *model.OutgoingOAuthConnection) (*model.OutgoingOAuthConnectionToken, *model.AppError) {
ret := _m.Called(rctx, conn)
if len(ret) == 0 {
panic("no return value specified for RetrieveTokenForConnection")
}
var r0 *model.OutgoingOAuthConnectionToken
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, *model.OutgoingOAuthConnection) (*model.OutgoingOAuthConnectionToken, *model.AppError)); ok {
@@ -157,6 +177,10 @@ func (_m *OutgoingOAuthConnectionInterface) SanitizeConnections(conns []*model.O
func (_m *OutgoingOAuthConnectionInterface) SaveConnection(rctx request.CTX, conn *model.OutgoingOAuthConnection) (*model.OutgoingOAuthConnection, *model.AppError) {
ret := _m.Called(rctx, conn)
if len(ret) == 0 {
panic("no return value specified for SaveConnection")
}
var r0 *model.OutgoingOAuthConnection
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, *model.OutgoingOAuthConnection) (*model.OutgoingOAuthConnection, *model.AppError)); ok {
@@ -185,6 +209,10 @@ func (_m *OutgoingOAuthConnectionInterface) SaveConnection(rctx request.CTX, con
func (_m *OutgoingOAuthConnectionInterface) UpdateConnection(rctx request.CTX, conn *model.OutgoingOAuthConnection) (*model.OutgoingOAuthConnection, *model.AppError) {
ret := _m.Called(rctx, conn)
if len(ret) == 0 {
panic("no return value specified for UpdateConnection")
}
var r0 *model.OutgoingOAuthConnection
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, *model.OutgoingOAuthConnection) (*model.OutgoingOAuthConnection, *model.AppError)); ok {
@@ -209,13 +237,12 @@ func (_m *OutgoingOAuthConnectionInterface) UpdateConnection(rctx request.CTX, c
return r0, r1
}
type mockConstructorTestingTNewOutgoingOAuthConnectionInterface interface {
// NewOutgoingOAuthConnectionInterface creates a new instance of OutgoingOAuthConnectionInterface. 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 NewOutgoingOAuthConnectionInterface(t interface {
mock.TestingT
Cleanup(func())
}
// NewOutgoingOAuthConnectionInterface creates a new instance of OutgoingOAuthConnectionInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewOutgoingOAuthConnectionInterface(t mockConstructorTestingTNewOutgoingOAuthConnectionInterface) *OutgoingOAuthConnectionInterface {
}) *OutgoingOAuthConnectionInterface {
mock := &OutgoingOAuthConnectionInterface{}
mock.Mock.Test(t)

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

@@ -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)

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

@@ -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`.
@@ -21,6 +21,10 @@ type Scheduler struct {
func (_m *Scheduler) Enabled(cfg *model.Config) bool {
ret := _m.Called(cfg)
if len(ret) == 0 {
panic("no return value specified for Enabled")
}
var r0 bool
if rf, ok := ret.Get(0).(func(*model.Config) bool); ok {
r0 = rf(cfg)
@@ -35,6 +39,10 @@ func (_m *Scheduler) Enabled(cfg *model.Config) bool {
func (_m *Scheduler) NextScheduleTime(cfg *model.Config, now time.Time, pendingJobs bool, lastSuccessfulJob *model.Job) *time.Time {
ret := _m.Called(cfg, now, pendingJobs, lastSuccessfulJob)
if len(ret) == 0 {
panic("no return value specified for NextScheduleTime")
}
var r0 *time.Time
if rf, ok := ret.Get(0).(func(*model.Config, time.Time, bool, *model.Job) *time.Time); ok {
r0 = rf(cfg, now, pendingJobs, lastSuccessfulJob)
@@ -51,6 +59,10 @@ func (_m *Scheduler) NextScheduleTime(cfg *model.Config, now time.Time, pendingJ
func (_m *Scheduler) ScheduleJob(c request.CTX, cfg *model.Config, pendingJobs bool, lastSuccessfulJob *model.Job) (*model.Job, *model.AppError) {
ret := _m.Called(c, cfg, pendingJobs, lastSuccessfulJob)
if len(ret) == 0 {
panic("no return value specified for ScheduleJob")
}
var r0 *model.Job
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(request.CTX, *model.Config, bool, *model.Job) (*model.Job, *model.AppError)); ok {
@@ -75,13 +87,12 @@ func (_m *Scheduler) ScheduleJob(c request.CTX, cfg *model.Config, pendingJobs b
return r0, r1
}
type mockConstructorTestingTNewScheduler interface {
// NewScheduler creates a new instance of Scheduler. 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 NewScheduler(t interface {
mock.TestingT
Cleanup(func())
}
// NewScheduler creates a new instance of Scheduler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewScheduler(t mockConstructorTestingTNewScheduler) *Scheduler {
}) *Scheduler {
mock := &Scheduler{}
mock.Mock.Test(t)