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