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
```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
96ab35ba34
Коммит
870cee30c6
@@ -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)
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user