Mockery started to throw errors like "Unexpected package creation during export data loading".

This was consistently reproducible locally and on upgrade, it has gone away.

```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2023-04-10 14:20:57 +05:30
коммит произвёл GitHub
родитель 6be0ed0d19
Коммит bcf115e315
77 изменённых файлов: 4317 добавлений и 876 удалений

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -45,3 +45,18 @@ func (_m *AccountMigrationInterface) MigrateToSaml(fromAuthService string, users
return r0
}
type mockConstructorTestingTNewAccountMigrationInterface 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 {
mock := &AccountMigrationInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -19,6 +19,10 @@ func (_m *CloudInterface) BootstrapSelfHostedSignup(req model.BootstrapSelfHoste
ret := _m.Called(req)
var r0 *model.BootstrapSelfHostedSignupResponse
var r1 error
if rf, ok := ret.Get(0).(func(model.BootstrapSelfHostedSignupRequest) (*model.BootstrapSelfHostedSignupResponse, error)); ok {
return rf(req)
}
if rf, ok := ret.Get(0).(func(model.BootstrapSelfHostedSignupRequest) *model.BootstrapSelfHostedSignupResponse); ok {
r0 = rf(req)
} else {
@@ -27,7 +31,6 @@ func (_m *CloudInterface) BootstrapSelfHostedSignup(req model.BootstrapSelfHoste
}
}
var r1 error
if rf, ok := ret.Get(1).(func(model.BootstrapSelfHostedSignupRequest) error); ok {
r1 = rf(req)
} else {
@@ -42,6 +45,10 @@ func (_m *CloudInterface) ChangeSubscription(userID string, subscriptionID strin
ret := _m.Called(userID, subscriptionID, subscriptionChange)
var r0 *model.Subscription
var r1 error
if rf, ok := ret.Get(0).(func(string, string, *model.SubscriptionChange) (*model.Subscription, error)); ok {
return rf(userID, subscriptionID, subscriptionChange)
}
if rf, ok := ret.Get(0).(func(string, string, *model.SubscriptionChange) *model.Subscription); ok {
r0 = rf(userID, subscriptionID, subscriptionChange)
} else {
@@ -50,7 +57,6 @@ func (_m *CloudInterface) ChangeSubscription(userID string, subscriptionID strin
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, string, *model.SubscriptionChange) error); ok {
r1 = rf(userID, subscriptionID, subscriptionChange)
} else {
@@ -93,6 +99,10 @@ func (_m *CloudInterface) ConfirmSelfHostedSignup(req model.SelfHostedConfirmPay
ret := _m.Called(req, requesterEmail)
var r0 *model.SelfHostedSignupConfirmResponse
var r1 error
if rf, ok := ret.Get(0).(func(model.SelfHostedConfirmPaymentMethodRequest, string) (*model.SelfHostedSignupConfirmResponse, error)); ok {
return rf(req, requesterEmail)
}
if rf, ok := ret.Get(0).(func(model.SelfHostedConfirmPaymentMethodRequest, string) *model.SelfHostedSignupConfirmResponse); ok {
r0 = rf(req, requesterEmail)
} else {
@@ -101,7 +111,6 @@ func (_m *CloudInterface) ConfirmSelfHostedSignup(req model.SelfHostedConfirmPay
}
}
var r1 error
if rf, ok := ret.Get(1).(func(model.SelfHostedConfirmPaymentMethodRequest, string) error); ok {
r1 = rf(req, requesterEmail)
} else {
@@ -130,6 +139,10 @@ func (_m *CloudInterface) CreateCustomerPayment(userID string) (*model.StripeSet
ret := _m.Called(userID)
var r0 *model.StripeSetupIntent
var r1 error
if rf, ok := ret.Get(0).(func(string) (*model.StripeSetupIntent, error)); ok {
return rf(userID)
}
if rf, ok := ret.Get(0).(func(string) *model.StripeSetupIntent); ok {
r0 = rf(userID)
} else {
@@ -138,7 +151,6 @@ func (_m *CloudInterface) CreateCustomerPayment(userID string) (*model.StripeSet
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(userID)
} else {
@@ -153,6 +165,10 @@ func (_m *CloudInterface) CreateCustomerSelfHostedSignup(req model.SelfHostedCus
ret := _m.Called(req, requesterEmail)
var r0 *model.SelfHostedSignupCustomerResponse
var r1 error
if rf, ok := ret.Get(0).(func(model.SelfHostedCustomerForm, string) (*model.SelfHostedSignupCustomerResponse, error)); ok {
return rf(req, requesterEmail)
}
if rf, ok := ret.Get(0).(func(model.SelfHostedCustomerForm, string) *model.SelfHostedSignupCustomerResponse); ok {
r0 = rf(req, requesterEmail)
} else {
@@ -161,7 +177,6 @@ func (_m *CloudInterface) CreateCustomerSelfHostedSignup(req model.SelfHostedCus
}
}
var r1 error
if rf, ok := ret.Get(1).(func(model.SelfHostedCustomerForm, string) error); ok {
r1 = rf(req, requesterEmail)
} else {
@@ -176,6 +191,10 @@ func (_m *CloudInterface) CreateOrUpdateSubscriptionHistoryEvent(userID string,
ret := _m.Called(userID, userCount)
var r0 *model.SubscriptionHistory
var r1 error
if rf, ok := ret.Get(0).(func(string, int) (*model.SubscriptionHistory, error)); ok {
return rf(userID, userCount)
}
if rf, ok := ret.Get(0).(func(string, int) *model.SubscriptionHistory); ok {
r0 = rf(userID, userCount)
} else {
@@ -184,7 +203,6 @@ func (_m *CloudInterface) CreateOrUpdateSubscriptionHistoryEvent(userID string,
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, int) error); ok {
r1 = rf(userID, userCount)
} else {
@@ -199,6 +217,10 @@ func (_m *CloudInterface) GetCloudCustomer(userID string) (*model.CloudCustomer,
ret := _m.Called(userID)
var r0 *model.CloudCustomer
var r1 error
if rf, ok := ret.Get(0).(func(string) (*model.CloudCustomer, error)); ok {
return rf(userID)
}
if rf, ok := ret.Get(0).(func(string) *model.CloudCustomer); ok {
r0 = rf(userID)
} else {
@@ -207,7 +229,6 @@ func (_m *CloudInterface) GetCloudCustomer(userID string) (*model.CloudCustomer,
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(userID)
} else {
@@ -222,6 +243,10 @@ func (_m *CloudInterface) GetCloudLimits(userID string) (*model.ProductLimits, e
ret := _m.Called(userID)
var r0 *model.ProductLimits
var r1 error
if rf, ok := ret.Get(0).(func(string) (*model.ProductLimits, error)); ok {
return rf(userID)
}
if rf, ok := ret.Get(0).(func(string) *model.ProductLimits); ok {
r0 = rf(userID)
} else {
@@ -230,7 +255,6 @@ func (_m *CloudInterface) GetCloudLimits(userID string) (*model.ProductLimits, e
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(userID)
} else {
@@ -245,6 +269,10 @@ func (_m *CloudInterface) GetCloudProduct(userID string, productID string) (*mod
ret := _m.Called(userID, productID)
var r0 *model.Product
var r1 error
if rf, ok := ret.Get(0).(func(string, string) (*model.Product, error)); ok {
return rf(userID, productID)
}
if rf, ok := ret.Get(0).(func(string, string) *model.Product); ok {
r0 = rf(userID, productID)
} else {
@@ -253,7 +281,6 @@ func (_m *CloudInterface) GetCloudProduct(userID string, productID string) (*mod
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(userID, productID)
} else {
@@ -268,6 +295,10 @@ func (_m *CloudInterface) GetCloudProducts(userID string, includeLegacyProducts
ret := _m.Called(userID, includeLegacyProducts)
var r0 []*model.Product
var r1 error
if rf, ok := ret.Get(0).(func(string, bool) ([]*model.Product, error)); ok {
return rf(userID, includeLegacyProducts)
}
if rf, ok := ret.Get(0).(func(string, bool) []*model.Product); ok {
r0 = rf(userID, includeLegacyProducts)
} else {
@@ -276,7 +307,6 @@ func (_m *CloudInterface) GetCloudProducts(userID string, includeLegacyProducts
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, bool) error); ok {
r1 = rf(userID, includeLegacyProducts)
} else {
@@ -291,6 +321,11 @@ func (_m *CloudInterface) GetInvoicePDF(userID string, invoiceID string) ([]byte
ret := _m.Called(userID, invoiceID)
var r0 []byte
var r1 string
var r2 error
if rf, ok := ret.Get(0).(func(string, string) ([]byte, string, error)); ok {
return rf(userID, invoiceID)
}
if rf, ok := ret.Get(0).(func(string, string) []byte); ok {
r0 = rf(userID, invoiceID)
} else {
@@ -299,14 +334,12 @@ func (_m *CloudInterface) GetInvoicePDF(userID string, invoiceID string) ([]byte
}
}
var r1 string
if rf, ok := ret.Get(1).(func(string, string) string); ok {
r1 = rf(userID, invoiceID)
} else {
r1 = ret.Get(1).(string)
}
var r2 error
if rf, ok := ret.Get(2).(func(string, string) error); ok {
r2 = rf(userID, invoiceID)
} else {
@@ -321,6 +354,10 @@ func (_m *CloudInterface) GetInvoicesForSubscription(userID string) ([]*model.In
ret := _m.Called(userID)
var r0 []*model.Invoice
var r1 error
if rf, ok := ret.Get(0).(func(string) ([]*model.Invoice, error)); ok {
return rf(userID)
}
if rf, ok := ret.Get(0).(func(string) []*model.Invoice); ok {
r0 = rf(userID)
} else {
@@ -329,7 +366,6 @@ func (_m *CloudInterface) GetInvoicesForSubscription(userID string) ([]*model.In
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(userID)
} else {
@@ -344,6 +380,10 @@ func (_m *CloudInterface) GetLicenseSelfServeStatus(userID string, token string)
ret := _m.Called(userID, token)
var r0 *model.SubscriptionLicenseSelfServeStatusResponse
var r1 error
if rf, ok := ret.Get(0).(func(string, string) (*model.SubscriptionLicenseSelfServeStatusResponse, error)); ok {
return rf(userID, token)
}
if rf, ok := ret.Get(0).(func(string, string) *model.SubscriptionLicenseSelfServeStatusResponse); ok {
r0 = rf(userID, token)
} else {
@@ -352,7 +392,6 @@ func (_m *CloudInterface) GetLicenseSelfServeStatus(userID string, token string)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(userID, token)
} else {
@@ -367,6 +406,11 @@ func (_m *CloudInterface) GetSelfHostedInvoicePDF(invoiceID string) ([]byte, str
ret := _m.Called(invoiceID)
var r0 []byte
var r1 string
var r2 error
if rf, ok := ret.Get(0).(func(string) ([]byte, string, error)); ok {
return rf(invoiceID)
}
if rf, ok := ret.Get(0).(func(string) []byte); ok {
r0 = rf(invoiceID)
} else {
@@ -375,14 +419,12 @@ func (_m *CloudInterface) GetSelfHostedInvoicePDF(invoiceID string) ([]byte, str
}
}
var r1 string
if rf, ok := ret.Get(1).(func(string) string); ok {
r1 = rf(invoiceID)
} else {
r1 = ret.Get(1).(string)
}
var r2 error
if rf, ok := ret.Get(2).(func(string) error); ok {
r2 = rf(invoiceID)
} else {
@@ -397,6 +439,10 @@ func (_m *CloudInterface) GetSelfHostedInvoices() ([]*model.Invoice, error) {
ret := _m.Called()
var r0 []*model.Invoice
var r1 error
if rf, ok := ret.Get(0).(func() ([]*model.Invoice, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() []*model.Invoice); ok {
r0 = rf()
} else {
@@ -405,7 +451,6 @@ func (_m *CloudInterface) GetSelfHostedInvoices() ([]*model.Invoice, error) {
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
@@ -420,6 +465,10 @@ func (_m *CloudInterface) GetSelfHostedProducts(userID string) ([]*model.Product
ret := _m.Called(userID)
var r0 []*model.Product
var r1 error
if rf, ok := ret.Get(0).(func(string) ([]*model.Product, error)); ok {
return rf(userID)
}
if rf, ok := ret.Get(0).(func(string) []*model.Product); ok {
r0 = rf(userID)
} else {
@@ -428,7 +477,6 @@ func (_m *CloudInterface) GetSelfHostedProducts(userID string) ([]*model.Product
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(userID)
} else {
@@ -443,6 +491,10 @@ func (_m *CloudInterface) GetSubscription(userID string) (*model.Subscription, e
ret := _m.Called(userID)
var r0 *model.Subscription
var r1 error
if rf, ok := ret.Get(0).(func(string) (*model.Subscription, error)); ok {
return rf(userID)
}
if rf, ok := ret.Get(0).(func(string) *model.Subscription); ok {
r0 = rf(userID)
} else {
@@ -451,7 +503,6 @@ func (_m *CloudInterface) GetSubscription(userID string) (*model.Subscription, e
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(userID)
} else {
@@ -494,6 +545,10 @@ func (_m *CloudInterface) RequestCloudTrial(userID string, subscriptionID string
ret := _m.Called(userID, subscriptionID, newValidBusinessEmail)
var r0 *model.Subscription
var r1 error
if rf, ok := ret.Get(0).(func(string, string, string) (*model.Subscription, error)); ok {
return rf(userID, subscriptionID, newValidBusinessEmail)
}
if rf, ok := ret.Get(0).(func(string, string, string) *model.Subscription); ok {
r0 = rf(userID, subscriptionID, newValidBusinessEmail)
} else {
@@ -502,7 +557,6 @@ func (_m *CloudInterface) RequestCloudTrial(userID string, subscriptionID string
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, string, string) error); ok {
r1 = rf(userID, subscriptionID, newValidBusinessEmail)
} else {
@@ -559,6 +613,10 @@ func (_m *CloudInterface) UpdateCloudCustomer(userID string, customerInfo *model
ret := _m.Called(userID, customerInfo)
var r0 *model.CloudCustomer
var r1 error
if rf, ok := ret.Get(0).(func(string, *model.CloudCustomerInfo) (*model.CloudCustomer, error)); ok {
return rf(userID, customerInfo)
}
if rf, ok := ret.Get(0).(func(string, *model.CloudCustomerInfo) *model.CloudCustomer); ok {
r0 = rf(userID, customerInfo)
} else {
@@ -567,7 +625,6 @@ func (_m *CloudInterface) UpdateCloudCustomer(userID string, customerInfo *model
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, *model.CloudCustomerInfo) error); ok {
r1 = rf(userID, customerInfo)
} else {
@@ -582,6 +639,10 @@ func (_m *CloudInterface) UpdateCloudCustomerAddress(userID string, address *mod
ret := _m.Called(userID, address)
var r0 *model.CloudCustomer
var r1 error
if rf, ok := ret.Get(0).(func(string, *model.Address) (*model.CloudCustomer, error)); ok {
return rf(userID, address)
}
if rf, ok := ret.Get(0).(func(string, *model.Address) *model.CloudCustomer); ok {
r0 = rf(userID, address)
} else {
@@ -590,7 +651,6 @@ func (_m *CloudInterface) UpdateCloudCustomerAddress(userID string, address *mod
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, *model.Address) error); ok {
r1 = rf(userID, address)
} else {
@@ -613,3 +673,18 @@ func (_m *CloudInterface) ValidateBusinessEmail(userID string, email string) err
return r0
}
type mockConstructorTestingTNewCloudInterface 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 {
mock := &CloudInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -45,3 +45,18 @@ func (_m *CloudJobInterface) MakeWorker() model.Worker {
return r0
}
type mockConstructorTestingTNewCloudJobInterface 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 {
mock := &CloudJobInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -67,6 +67,10 @@ func (_m *ClusterInterface) GetClusterStats() ([]*model.ClusterStats, *model.App
ret := _m.Called()
var r0 []*model.ClusterStats
var r1 *model.AppError
if rf, ok := ret.Get(0).(func() ([]*model.ClusterStats, *model.AppError)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() []*model.ClusterStats); ok {
r0 = rf()
} else {
@@ -75,7 +79,6 @@ func (_m *ClusterInterface) GetClusterStats() ([]*model.ClusterStats, *model.App
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func() *model.AppError); ok {
r1 = rf()
} else {
@@ -92,6 +95,10 @@ func (_m *ClusterInterface) GetLogs(page int, perPage int) ([]string, *model.App
ret := _m.Called(page, perPage)
var r0 []string
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(int, int) ([]string, *model.AppError)); ok {
return rf(page, perPage)
}
if rf, ok := ret.Get(0).(func(int, int) []string); ok {
r0 = rf(page, perPage)
} else {
@@ -100,7 +107,6 @@ func (_m *ClusterInterface) GetLogs(page int, perPage int) ([]string, *model.App
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(int, int) *model.AppError); ok {
r1 = rf(page, perPage)
} else {
@@ -133,6 +139,10 @@ func (_m *ClusterInterface) GetPluginStatuses() (model.PluginStatuses, *model.Ap
ret := _m.Called()
var r0 model.PluginStatuses
var r1 *model.AppError
if rf, ok := ret.Get(0).(func() (model.PluginStatuses, *model.AppError)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() model.PluginStatuses); ok {
r0 = rf()
} else {
@@ -141,7 +151,6 @@ func (_m *ClusterInterface) GetPluginStatuses() (model.PluginStatuses, *model.Ap
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func() *model.AppError); ok {
r1 = rf()
} else {
@@ -191,6 +200,10 @@ func (_m *ClusterInterface) QueryLogs(page int, perPage int) (map[string][]strin
ret := _m.Called(page, perPage)
var r0 map[string][]string
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(int, int) (map[string][]string, *model.AppError)); ok {
return rf(page, perPage)
}
if rf, ok := ret.Get(0).(func(int, int) map[string][]string); ok {
r0 = rf(page, perPage)
} else {
@@ -199,7 +212,6 @@ func (_m *ClusterInterface) QueryLogs(page int, perPage int) (map[string][]strin
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(int, int) *model.AppError); ok {
r1 = rf(page, perPage)
} else {
@@ -244,3 +256,18 @@ func (_m *ClusterInterface) StartInterNodeCommunication() {
func (_m *ClusterInterface) StopInterNodeCommunication() {
_m.Called()
}
type mockConstructorTestingTNewClusterInterface 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 {
mock := &ClusterInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -18,3 +18,18 @@ type ClusterMessageHandler struct {
func (_m *ClusterMessageHandler) Execute(msg *model.ClusterMessage) {
_m.Called(msg)
}
type mockConstructorTestingTNewClusterMessageHandler 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 {
mock := &ClusterMessageHandler{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -34,3 +34,18 @@ func (_m *ComplianceInterface) RunComplianceJob(job *model.Compliance) *model.Ap
func (_m *ComplianceInterface) StartComplianceDailyJob() {
_m.Called()
}
type mockConstructorTestingTNewComplianceInterface 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 {
mock := &ComplianceInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -51,6 +51,10 @@ func (_m *DataRetentionInterface) CreatePolicy(policy *model.RetentionPolicyWith
ret := _m.Called(policy)
var r0 *model.RetentionPolicyWithTeamAndChannelCounts
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(*model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError)); ok {
return rf(policy)
}
if rf, ok := ret.Get(0).(func(*model.RetentionPolicyWithTeamAndChannelIDs) *model.RetentionPolicyWithTeamAndChannelCounts); ok {
r0 = rf(policy)
} else {
@@ -59,7 +63,6 @@ func (_m *DataRetentionInterface) CreatePolicy(policy *model.RetentionPolicyWith
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(*model.RetentionPolicyWithTeamAndChannelIDs) *model.AppError); ok {
r1 = rf(policy)
} else {
@@ -92,6 +95,10 @@ func (_m *DataRetentionInterface) GetChannelPoliciesForUser(userID string, offse
ret := _m.Called(userID, offset, limit)
var r0 *model.RetentionPolicyForChannelList
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, int, int) (*model.RetentionPolicyForChannelList, *model.AppError)); ok {
return rf(userID, offset, limit)
}
if rf, ok := ret.Get(0).(func(string, int, int) *model.RetentionPolicyForChannelList); ok {
r0 = rf(userID, offset, limit)
} else {
@@ -100,7 +107,6 @@ func (_m *DataRetentionInterface) GetChannelPoliciesForUser(userID string, offse
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
r1 = rf(userID, offset, limit)
} else {
@@ -117,6 +123,10 @@ func (_m *DataRetentionInterface) GetChannelsForPolicy(policyID string, offset i
ret := _m.Called(policyID, offset, limit)
var r0 *model.ChannelsWithCount
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, int, int) (*model.ChannelsWithCount, *model.AppError)); ok {
return rf(policyID, offset, limit)
}
if rf, ok := ret.Get(0).(func(string, int, int) *model.ChannelsWithCount); ok {
r0 = rf(policyID, offset, limit)
} else {
@@ -125,7 +135,6 @@ func (_m *DataRetentionInterface) GetChannelsForPolicy(policyID string, offset i
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
r1 = rf(policyID, offset, limit)
} else {
@@ -142,6 +151,10 @@ func (_m *DataRetentionInterface) GetGlobalPolicy() (*model.GlobalRetentionPolic
ret := _m.Called()
var r0 *model.GlobalRetentionPolicy
var r1 *model.AppError
if rf, ok := ret.Get(0).(func() (*model.GlobalRetentionPolicy, *model.AppError)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() *model.GlobalRetentionPolicy); ok {
r0 = rf()
} else {
@@ -150,7 +163,6 @@ func (_m *DataRetentionInterface) GetGlobalPolicy() (*model.GlobalRetentionPolic
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func() *model.AppError); ok {
r1 = rf()
} else {
@@ -167,6 +179,10 @@ func (_m *DataRetentionInterface) GetPolicies(offset int, limit int) (*model.Ret
ret := _m.Called(offset, limit)
var r0 *model.RetentionPolicyWithTeamAndChannelCountsList
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(int, int) (*model.RetentionPolicyWithTeamAndChannelCountsList, *model.AppError)); ok {
return rf(offset, limit)
}
if rf, ok := ret.Get(0).(func(int, int) *model.RetentionPolicyWithTeamAndChannelCountsList); ok {
r0 = rf(offset, limit)
} else {
@@ -175,7 +191,6 @@ func (_m *DataRetentionInterface) GetPolicies(offset int, limit int) (*model.Ret
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(int, int) *model.AppError); ok {
r1 = rf(offset, limit)
} else {
@@ -192,13 +207,16 @@ func (_m *DataRetentionInterface) GetPoliciesCount() (int64, *model.AppError) {
ret := _m.Called()
var r0 int64
var r1 *model.AppError
if rf, ok := ret.Get(0).(func() (int64, *model.AppError)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() int64); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(int64)
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func() *model.AppError); ok {
r1 = rf()
} else {
@@ -215,6 +233,10 @@ func (_m *DataRetentionInterface) GetPolicy(policyID string) (*model.RetentionPo
ret := _m.Called(policyID)
var r0 *model.RetentionPolicyWithTeamAndChannelCounts
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError)); ok {
return rf(policyID)
}
if rf, ok := ret.Get(0).(func(string) *model.RetentionPolicyWithTeamAndChannelCounts); ok {
r0 = rf(policyID)
} else {
@@ -223,7 +245,6 @@ func (_m *DataRetentionInterface) GetPolicy(policyID string) (*model.RetentionPo
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
r1 = rf(policyID)
} else {
@@ -240,6 +261,10 @@ func (_m *DataRetentionInterface) GetTeamPoliciesForUser(userID string, offset i
ret := _m.Called(userID, offset, limit)
var r0 *model.RetentionPolicyForTeamList
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, int, int) (*model.RetentionPolicyForTeamList, *model.AppError)); ok {
return rf(userID, offset, limit)
}
if rf, ok := ret.Get(0).(func(string, int, int) *model.RetentionPolicyForTeamList); ok {
r0 = rf(userID, offset, limit)
} else {
@@ -248,7 +273,6 @@ func (_m *DataRetentionInterface) GetTeamPoliciesForUser(userID string, offset i
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
r1 = rf(userID, offset, limit)
} else {
@@ -265,6 +289,10 @@ func (_m *DataRetentionInterface) GetTeamsForPolicy(policyID string, offset int,
ret := _m.Called(policyID, offset, limit)
var r0 *model.TeamsWithCount
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, int, int) (*model.TeamsWithCount, *model.AppError)); ok {
return rf(policyID, offset, limit)
}
if rf, ok := ret.Get(0).(func(string, int, int) *model.TeamsWithCount); ok {
r0 = rf(policyID, offset, limit)
} else {
@@ -273,7 +301,6 @@ func (_m *DataRetentionInterface) GetTeamsForPolicy(policyID string, offset int,
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
r1 = rf(policyID, offset, limit)
} else {
@@ -290,6 +317,10 @@ func (_m *DataRetentionInterface) PatchPolicy(patch *model.RetentionPolicyWithTe
ret := _m.Called(patch)
var r0 *model.RetentionPolicyWithTeamAndChannelCounts
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(*model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError)); ok {
return rf(patch)
}
if rf, ok := ret.Get(0).(func(*model.RetentionPolicyWithTeamAndChannelIDs) *model.RetentionPolicyWithTeamAndChannelCounts); ok {
r0 = rf(patch)
} else {
@@ -298,7 +329,6 @@ func (_m *DataRetentionInterface) PatchPolicy(patch *model.RetentionPolicyWithTe
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(*model.RetentionPolicyWithTeamAndChannelIDs) *model.AppError); ok {
r1 = rf(patch)
} else {
@@ -341,3 +371,18 @@ func (_m *DataRetentionInterface) RemoveTeamsFromPolicy(policyID string, teamIDs
return r0
}
type mockConstructorTestingTNewDataRetentionInterface 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 {
mock := &DataRetentionInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -45,3 +45,18 @@ func (_m *DataRetentionJobInterface) MakeWorker() model.Worker {
return r0
}
type mockConstructorTestingTNewDataRetentionJobInterface 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 {
mock := &DataRetentionJobInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -45,3 +45,18 @@ func (_m *ElasticsearchAggregatorInterface) MakeWorker() model.Worker {
return r0
}
type mockConstructorTestingTNewElasticsearchAggregatorInterface 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 {
mock := &ElasticsearchAggregatorInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -29,3 +29,18 @@ func (_m *ElasticsearchIndexerInterface) MakeWorker() model.Worker {
return r0
}
type mockConstructorTestingTNewElasticsearchIndexerInterface 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 {
mock := &ElasticsearchIndexerInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -29,3 +29,18 @@ func (_m *IndexerJobInterface) MakeWorker() model.Worker {
return r0
}
type mockConstructorTestingTNewIndexerJobInterface 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 {
mock := &IndexerJobInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -66,6 +66,10 @@ func (_m *LdapInterface) DoLogin(c *request.Context, id string, password string)
ret := _m.Called(c, id, password)
var r0 *model.User
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(*request.Context, string, string) (*model.User, *model.AppError)); ok {
return rf(c, id, password)
}
if rf, ok := ret.Get(0).(func(*request.Context, string, string) *model.User); ok {
r0 = rf(c, id, password)
} else {
@@ -74,7 +78,6 @@ func (_m *LdapInterface) DoLogin(c *request.Context, id string, password string)
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(*request.Context, string, string) *model.AppError); ok {
r1 = rf(c, id, password)
} else {
@@ -121,6 +124,11 @@ func (_m *LdapInterface) GetAllGroupsPage(page int, perPage int, opts model.Ldap
ret := _m.Called(page, perPage, opts)
var r0 []*model.Group
var r1 int
var r2 *model.AppError
if rf, ok := ret.Get(0).(func(int, int, model.LdapGroupSearchOpts) ([]*model.Group, int, *model.AppError)); ok {
return rf(page, perPage, opts)
}
if rf, ok := ret.Get(0).(func(int, int, model.LdapGroupSearchOpts) []*model.Group); ok {
r0 = rf(page, perPage, opts)
} else {
@@ -129,14 +137,12 @@ func (_m *LdapInterface) GetAllGroupsPage(page int, perPage int, opts model.Ldap
}
}
var r1 int
if rf, ok := ret.Get(1).(func(int, int, model.LdapGroupSearchOpts) int); ok {
r1 = rf(page, perPage, opts)
} else {
r1 = ret.Get(1).(int)
}
var r2 *model.AppError
if rf, ok := ret.Get(2).(func(int, int, model.LdapGroupSearchOpts) *model.AppError); ok {
r2 = rf(page, perPage, opts)
} else {
@@ -153,6 +159,10 @@ func (_m *LdapInterface) GetAllLdapUsers() ([]*model.User, *model.AppError) {
ret := _m.Called()
var r0 []*model.User
var r1 *model.AppError
if rf, ok := ret.Get(0).(func() ([]*model.User, *model.AppError)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() []*model.User); ok {
r0 = rf()
} else {
@@ -161,7 +171,6 @@ func (_m *LdapInterface) GetAllLdapUsers() ([]*model.User, *model.AppError) {
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func() *model.AppError); ok {
r1 = rf()
} else {
@@ -178,6 +187,10 @@ func (_m *LdapInterface) GetGroup(groupUID string) (*model.Group, *model.AppErro
ret := _m.Called(groupUID)
var r0 *model.Group
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string) (*model.Group, *model.AppError)); ok {
return rf(groupUID)
}
if rf, ok := ret.Get(0).(func(string) *model.Group); ok {
r0 = rf(groupUID)
} else {
@@ -186,7 +199,6 @@ func (_m *LdapInterface) GetGroup(groupUID string) (*model.Group, *model.AppErro
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
r1 = rf(groupUID)
} else {
@@ -217,6 +229,10 @@ func (_m *LdapInterface) GetUser(id string) (*model.User, *model.AppError) {
ret := _m.Called(id)
var r0 *model.User
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string) (*model.User, *model.AppError)); ok {
return rf(id)
}
if rf, ok := ret.Get(0).(func(string) *model.User); ok {
r0 = rf(id)
} else {
@@ -225,7 +241,6 @@ func (_m *LdapInterface) GetUser(id string) (*model.User, *model.AppError) {
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
r1 = rf(id)
} else {
@@ -242,6 +257,10 @@ func (_m *LdapInterface) GetUserAttributes(id string, attributes []string) (map[
ret := _m.Called(id, attributes)
var r0 map[string]string
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, []string) (map[string]string, *model.AppError)); ok {
return rf(id, attributes)
}
if rf, ok := ret.Get(0).(func(string, []string) map[string]string); ok {
r0 = rf(id, attributes)
} else {
@@ -250,7 +269,6 @@ func (_m *LdapInterface) GetUserAttributes(id string, attributes []string) (map[
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok {
r1 = rf(id, attributes)
} else {
@@ -267,13 +285,16 @@ func (_m *LdapInterface) GetVendorNameAndVendorVersion() (string, string) {
ret := _m.Called()
var r0 string
var r1 string
if rf, ok := ret.Get(0).(func() (string, string)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
var r1 string
if rf, ok := ret.Get(1).(func() string); ok {
r1 = rf()
} else {
@@ -318,6 +339,10 @@ func (_m *LdapInterface) StartSynchronizeJob(waitForJobToFinish bool, includeRem
ret := _m.Called(waitForJobToFinish, includeRemovedMembers)
var r0 *model.Job
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(bool, bool) (*model.Job, *model.AppError)); ok {
return rf(waitForJobToFinish, includeRemovedMembers)
}
if rf, ok := ret.Get(0).(func(bool, bool) *model.Job); ok {
r0 = rf(waitForJobToFinish, includeRemovedMembers)
} else {
@@ -326,7 +351,6 @@ func (_m *LdapInterface) StartSynchronizeJob(waitForJobToFinish bool, includeRem
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(bool, bool) *model.AppError); ok {
r1 = rf(waitForJobToFinish, includeRemovedMembers)
} else {
@@ -358,3 +382,18 @@ func (_m *LdapInterface) SwitchToLdap(userID string, ldapID string, ldapPassword
func (_m *LdapInterface) UpdateProfilePictureIfNecessary(_a0 request.CTX, _a1 model.User, _a2 model.Session) {
_m.Called(_a0, _a1, _a2)
}
type mockConstructorTestingTNewLdapInterface 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 {
mock := &LdapInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -45,3 +45,18 @@ func (_m *LdapSyncInterface) MakeWorker() model.Worker {
return r0
}
type mockConstructorTestingTNewLdapSyncInterface 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 {
mock := &LdapSyncInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -19,13 +19,16 @@ func (_m *LicenseInterface) CanStartTrial() (bool, error) {
ret := _m.Called()
var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func() (bool, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
@@ -40,6 +43,10 @@ func (_m *LicenseInterface) GetPrevTrial() (*model.License, error) {
ret := _m.Called()
var r0 *model.License
var r1 error
if rf, ok := ret.Get(0).(func() (*model.License, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() *model.License); ok {
r0 = rf()
} else {
@@ -48,7 +55,6 @@ func (_m *LicenseInterface) GetPrevTrial() (*model.License, error) {
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
@@ -57,3 +63,18 @@ func (_m *LicenseInterface) GetPrevTrial() (*model.License, error) {
return r0, r1
}
type mockConstructorTestingTNewLicenseInterface 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 {
mock := &LicenseInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -22,13 +22,16 @@ func (_m *MessageExportInterface) RunExport(format string, since int64, limit in
ret := _m.Called(format, since, limit)
var r0 int64
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, int64, int) (int64, *model.AppError)); ok {
return rf(format, since, limit)
}
if rf, ok := ret.Get(0).(func(string, int64, int) int64); ok {
r0 = rf(format, since, limit)
} else {
r0 = ret.Get(0).(int64)
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string, int64, int) *model.AppError); ok {
r1 = rf(format, since, limit)
} else {
@@ -45,6 +48,10 @@ func (_m *MessageExportInterface) StartSynchronizeJob(ctx context.Context, expor
ret := _m.Called(ctx, exportFromTimestamp)
var r0 *model.Job
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(context.Context, int64) (*model.Job, *model.AppError)); ok {
return rf(ctx, exportFromTimestamp)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) *model.Job); ok {
r0 = rf(ctx, exportFromTimestamp)
} else {
@@ -53,7 +60,6 @@ func (_m *MessageExportInterface) StartSynchronizeJob(ctx context.Context, expor
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(context.Context, int64) *model.AppError); ok {
r1 = rf(ctx, exportFromTimestamp)
} else {
@@ -64,3 +70,18 @@ func (_m *MessageExportInterface) StartSynchronizeJob(ctx context.Context, expor
return r0, r1
}
type mockConstructorTestingTNewMessageExportInterface 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 {
mock := &MessageExportInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -45,3 +45,18 @@ func (_m *MessageExportJobInterface) MakeWorker() model.Worker {
return r0
}
type mockConstructorTestingTNewMessageExportJobInterface 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 {
mock := &MessageExportJobInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -318,3 +318,18 @@ func (_m *MetricsInterface) SetReplicaLagAbsolute(node string, value float64) {
func (_m *MetricsInterface) SetReplicaLagTime(node string, value float64) {
_m.Called(node, value)
}
type mockConstructorTestingTNewMetricsInterface 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 {
mock := &MetricsInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -51,13 +51,17 @@ func (_m *MfaInterface) GenerateSecret(user *model.User) (string, []byte, *model
ret := _m.Called(user)
var r0 string
var r1 []byte
var r2 *model.AppError
if rf, ok := ret.Get(0).(func(*model.User) (string, []byte, *model.AppError)); ok {
return rf(user)
}
if rf, ok := ret.Get(0).(func(*model.User) string); ok {
r0 = rf(user)
} else {
r0 = ret.Get(0).(string)
}
var r1 []byte
if rf, ok := ret.Get(1).(func(*model.User) []byte); ok {
r1 = rf(user)
} else {
@@ -66,7 +70,6 @@ func (_m *MfaInterface) GenerateSecret(user *model.User) (string, []byte, *model
}
}
var r2 *model.AppError
if rf, ok := ret.Get(2).(func(*model.User) *model.AppError); ok {
r2 = rf(user)
} else {
@@ -83,13 +86,16 @@ func (_m *MfaInterface) ValidateToken(secret string, token string) (bool, *model
ret := _m.Called(secret, token)
var r0 bool
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string, string) (bool, *model.AppError)); ok {
return rf(secret, token)
}
if rf, ok := ret.Get(0).(func(string, string) bool); ok {
r0 = rf(secret, token)
} else {
r0 = ret.Get(0).(bool)
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
r1 = rf(secret, token)
} else {
@@ -100,3 +106,18 @@ func (_m *MfaInterface) ValidateToken(secret string, token string) (bool, *model
return r0, r1
}
type mockConstructorTestingTNewMfaInterface interface {
mock.TestingT
Cleanup(func())
}
// NewMfaInterface creates a new instance of MfaInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMfaInterface(t mockConstructorTestingTNewMfaInterface) *MfaInterface {
mock := &MfaInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -35,6 +35,10 @@ func (_m *NotificationInterface) GetNotificationMessage(ack *model.PushNotificat
ret := _m.Called(ack, userID)
var r0 *model.PushNotification
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(*model.PushNotificationAck, string) (*model.PushNotification, *model.AppError)); ok {
return rf(ack, userID)
}
if rf, ok := ret.Get(0).(func(*model.PushNotificationAck, string) *model.PushNotification); ok {
r0 = rf(ack, userID)
} else {
@@ -43,7 +47,6 @@ func (_m *NotificationInterface) GetNotificationMessage(ack *model.PushNotificat
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(*model.PushNotificationAck, string) *model.AppError); ok {
r1 = rf(ack, userID)
} else {
@@ -54,3 +57,18 @@ func (_m *NotificationInterface) GetNotificationMessage(ack *model.PushNotificat
return r0, r1
}
type mockConstructorTestingTNewNotificationInterface 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 {
mock := &NotificationInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -21,6 +21,10 @@ func (_m *OAuthProvider) GetSSOSettings(config *model.Config, service string) (*
ret := _m.Called(config, service)
var r0 *model.SSOSettings
var r1 error
if rf, ok := ret.Get(0).(func(*model.Config, string) (*model.SSOSettings, error)); ok {
return rf(config, service)
}
if rf, ok := ret.Get(0).(func(*model.Config, string) *model.SSOSettings); ok {
r0 = rf(config, service)
} else {
@@ -29,7 +33,6 @@ func (_m *OAuthProvider) GetSSOSettings(config *model.Config, service string) (*
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*model.Config, string) error); ok {
r1 = rf(config, service)
} else {
@@ -44,6 +47,10 @@ func (_m *OAuthProvider) GetUserFromIdToken(idToken string) (*model.User, error)
ret := _m.Called(idToken)
var r0 *model.User
var r1 error
if rf, ok := ret.Get(0).(func(string) (*model.User, error)); ok {
return rf(idToken)
}
if rf, ok := ret.Get(0).(func(string) *model.User); ok {
r0 = rf(idToken)
} else {
@@ -52,7 +59,6 @@ func (_m *OAuthProvider) GetUserFromIdToken(idToken string) (*model.User, error)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(idToken)
} else {
@@ -67,6 +73,10 @@ func (_m *OAuthProvider) GetUserFromJSON(data io.Reader, tokenUser *model.User)
ret := _m.Called(data, tokenUser)
var r0 *model.User
var r1 error
if rf, ok := ret.Get(0).(func(io.Reader, *model.User) (*model.User, error)); ok {
return rf(data, tokenUser)
}
if rf, ok := ret.Get(0).(func(io.Reader, *model.User) *model.User); ok {
r0 = rf(data, tokenUser)
} else {
@@ -75,7 +85,6 @@ func (_m *OAuthProvider) GetUserFromJSON(data io.Reader, tokenUser *model.User)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(io.Reader, *model.User) error); ok {
r1 = rf(data, tokenUser)
} else {
@@ -98,3 +107,18 @@ func (_m *OAuthProvider) IsSameUser(dbUser *model.User, oAuthUser *model.User) b
return r0
}
type mockConstructorTestingTNewOAuthProvider 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 {
mock := &OAuthProvider{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

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

@@ -1,4 +1,4 @@
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.23.2. DO NOT EDIT.
// Regenerate this file using `make einterfaces-mocks`.
@@ -20,6 +20,10 @@ func (_m *SamlInterface) BuildRequest(relayState string) (*model.SamlAuthRequest
ret := _m.Called(relayState)
var r0 *model.SamlAuthRequest
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(string) (*model.SamlAuthRequest, *model.AppError)); ok {
return rf(relayState)
}
if rf, ok := ret.Get(0).(func(string) *model.SamlAuthRequest); ok {
r0 = rf(relayState)
} else {
@@ -28,7 +32,6 @@ func (_m *SamlInterface) BuildRequest(relayState string) (*model.SamlAuthRequest
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
r1 = rf(relayState)
} else {
@@ -73,6 +76,10 @@ func (_m *SamlInterface) DoLogin(c *request.Context, encodedXML string, relaySta
ret := _m.Called(c, encodedXML, relayState)
var r0 *model.User
var r1 *model.AppError
if rf, ok := ret.Get(0).(func(*request.Context, string, map[string]string) (*model.User, *model.AppError)); ok {
return rf(c, encodedXML, relayState)
}
if rf, ok := ret.Get(0).(func(*request.Context, string, map[string]string) *model.User); ok {
r0 = rf(c, encodedXML, relayState)
} else {
@@ -81,7 +88,6 @@ func (_m *SamlInterface) DoLogin(c *request.Context, encodedXML string, relaySta
}
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(*request.Context, string, map[string]string) *model.AppError); ok {
r1 = rf(c, encodedXML, relayState)
} else {
@@ -98,13 +104,16 @@ func (_m *SamlInterface) GetMetadata() (string, *model.AppError) {
ret := _m.Called()
var r0 string
var r1 *model.AppError
if rf, ok := ret.Get(0).(func() (string, *model.AppError)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func() *model.AppError); ok {
r1 = rf()
} else {
@@ -115,3 +124,18 @@ func (_m *SamlInterface) GetMetadata() (string, *model.AppError) {
return r0, r1
}
type mockConstructorTestingTNewSamlInterface 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 {
mock := &SamlInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}