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 email-mocks`.
@@ -44,6 +44,10 @@ func (_m *ServiceInterface) CreateVerifyEmailToken(userID string, newEmail strin
ret := _m.Called(userID, newEmail)
var r0 *model.Token
var r1 error
if rf, ok := ret.Get(0).(func(string, string) (*model.Token, error)); ok {
return rf(userID, newEmail)
}
if rf, ok := ret.Get(0).(func(string, string) *model.Token); ok {
r0 = rf(userID, newEmail)
} else {
@@ -52,7 +56,6 @@ func (_m *ServiceInterface) CreateVerifyEmailToken(userID string, newEmail strin
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(userID, newEmail)
} else {
@@ -326,6 +329,10 @@ func (_m *ServiceInterface) SendInviteEmailsToTeamAndChannels(team *model.Team,
ret := _m.Called(team, channels, senderName, senderUserId, senderProfileImage, invites, siteURL, reminderData, message, errorWhenNotSent, isSystemAdmin, isFirstAdmin)
var r0 []*model.EmailInviteWithError
var r1 error
if rf, ok := ret.Get(0).(func(*model.Team, []*model.Channel, string, string, []byte, []string, string, *model.TeamInviteReminderData, string, bool, bool, bool) ([]*model.EmailInviteWithError, error)); ok {
return rf(team, channels, senderName, senderUserId, senderProfileImage, invites, siteURL, reminderData, message, errorWhenNotSent, isSystemAdmin, isFirstAdmin)
}
if rf, ok := ret.Get(0).(func(*model.Team, []*model.Channel, string, string, []byte, []string, string, *model.TeamInviteReminderData, string, bool, bool, bool) []*model.EmailInviteWithError); ok {
r0 = rf(team, channels, senderName, senderUserId, senderProfileImage, invites, siteURL, reminderData, message, errorWhenNotSent, isSystemAdmin, isFirstAdmin)
} else {
@@ -334,7 +341,6 @@ func (_m *ServiceInterface) SendInviteEmailsToTeamAndChannels(team *model.Team,
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*model.Team, []*model.Channel, string, string, []byte, []string, string, *model.TeamInviteReminderData, string, bool, bool, bool) error); ok {
r1 = rf(team, channels, senderName, senderUserId, senderProfileImage, invites, siteURL, reminderData, message, errorWhenNotSent, isSystemAdmin, isFirstAdmin)
} else {
@@ -433,13 +439,16 @@ func (_m *ServiceInterface) SendPasswordResetEmail(_a0 string, token *model.Toke
ret := _m.Called(_a0, token, locale, siteURL)
var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(string, *model.Token, string, string) (bool, error)); ok {
return rf(_a0, token, locale, siteURL)
}
if rf, ok := ret.Get(0).(func(string, *model.Token, string, string) bool); ok {
r0 = rf(_a0, token, locale, siteURL)
} else {
r0 = ret.Get(0).(bool)
}
var r1 error
if rf, ok := ret.Get(1).(func(string, *model.Token, string, string) error); ok {
r1 = rf(_a0, token, locale, siteURL)
} else {
@@ -454,13 +463,16 @@ func (_m *ServiceInterface) SendPaymentFailedEmail(_a0 string, locale string, fa
ret := _m.Called(_a0, locale, failedPayment, planName, siteURL)
var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(string, string, *model.FailedPayment, string, string) (bool, error)); ok {
return rf(_a0, locale, failedPayment, planName, siteURL)
}
if rf, ok := ret.Get(0).(func(string, string, *model.FailedPayment, string, string) bool); ok {
r0 = rf(_a0, locale, failedPayment, planName, siteURL)
} else {
r0 = ret.Get(0).(bool)
}
var r1 error
if rf, ok := ret.Get(1).(func(string, string, *model.FailedPayment, string, string) error); ok {
r1 = rf(_a0, locale, failedPayment, planName, siteURL)
} else {
@@ -544,3 +556,18 @@ func (_m *ServiceInterface) SendWelcomeEmail(userID string, _a1 string, verified
func (_m *ServiceInterface) Stop() {
_m.Called()
}
type mockConstructorTestingTNewServiceInterface interface {
mock.TestingT
Cleanup(func())
}
// NewServiceInterface creates a new instance of ServiceInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewServiceInterface(t mockConstructorTestingTNewServiceInterface) *ServiceInterface {
mock := &ServiceInterface{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}