Upgrade mockery to fix errors (#22892)
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 ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
6be0ed0d19
Коммит
bcf115e315
@@ -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
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user