fix: re-generate mocks for search service

This commit is contained in:
Ralf Haferkamp
2025-09-09 17:04:21 +02:00
committed by Ralf Haferkamp
parent b9a0bb034c
commit bcc96f1371
3 changed files with 119 additions and 16 deletions
@@ -151,16 +151,16 @@ func (_c *BatchOperator_Move_Call) RunAndReturn(run func(rootID string, parentID
}
// Purge provides a mock function for the type BatchOperator
func (_mock *BatchOperator) Purge(id string) error {
ret := _mock.Called(id)
func (_mock *BatchOperator) Purge(id string, onlyDeleted bool) error {
ret := _mock.Called(id, onlyDeleted)
if len(ret) == 0 {
panic("no return value specified for Purge")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string) error); ok {
r0 = returnFunc(id)
if returnFunc, ok := ret.Get(0).(func(string, bool) error); ok {
r0 = returnFunc(id, onlyDeleted)
} else {
r0 = ret.Error(0)
}
@@ -174,18 +174,24 @@ type BatchOperator_Purge_Call struct {
// Purge is a helper method to define mock.On call
// - id string
func (_e *BatchOperator_Expecter) Purge(id interface{}) *BatchOperator_Purge_Call {
return &BatchOperator_Purge_Call{Call: _e.mock.On("Purge", id)}
// - onlyDeleted bool
func (_e *BatchOperator_Expecter) Purge(id interface{}, onlyDeleted interface{}) *BatchOperator_Purge_Call {
return &BatchOperator_Purge_Call{Call: _e.mock.On("Purge", id, onlyDeleted)}
}
func (_c *BatchOperator_Purge_Call) Run(run func(id string)) *BatchOperator_Purge_Call {
func (_c *BatchOperator_Purge_Call) Run(run func(id string, onlyDeleted bool)) *BatchOperator_Purge_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
var arg1 bool
if args[1] != nil {
arg1 = args[1].(bool)
}
run(
arg0,
arg1,
)
})
return _c
@@ -196,7 +202,7 @@ func (_c *BatchOperator_Purge_Call) Return(err error) *BatchOperator_Purge_Call
return _c
}
func (_c *BatchOperator_Purge_Call) RunAndReturn(run func(id string) error) *BatchOperator_Purge_Call {
func (_c *BatchOperator_Purge_Call) RunAndReturn(run func(id string, onlyDeleted bool) error) *BatchOperator_Purge_Call {
_c.Call.Return(run)
return _c
}
+14 -8
View File
@@ -269,16 +269,16 @@ func (_c *Engine_NewBatch_Call) RunAndReturn(run func(batchSize int) (search.Bat
}
// Purge provides a mock function for the type Engine
func (_mock *Engine) Purge(id string) error {
ret := _mock.Called(id)
func (_mock *Engine) Purge(id string, onlyDeleted bool) error {
ret := _mock.Called(id, onlyDeleted)
if len(ret) == 0 {
panic("no return value specified for Purge")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(string) error); ok {
r0 = returnFunc(id)
if returnFunc, ok := ret.Get(0).(func(string, bool) error); ok {
r0 = returnFunc(id, onlyDeleted)
} else {
r0 = ret.Error(0)
}
@@ -292,18 +292,24 @@ type Engine_Purge_Call struct {
// Purge is a helper method to define mock.On call
// - id string
func (_e *Engine_Expecter) Purge(id interface{}) *Engine_Purge_Call {
return &Engine_Purge_Call{Call: _e.mock.On("Purge", id)}
// - onlyDeleted bool
func (_e *Engine_Expecter) Purge(id interface{}, onlyDeleted interface{}) *Engine_Purge_Call {
return &Engine_Purge_Call{Call: _e.mock.On("Purge", id, onlyDeleted)}
}
func (_c *Engine_Purge_Call) Run(run func(id string)) *Engine_Purge_Call {
func (_c *Engine_Purge_Call) Run(run func(id string, onlyDeleted bool)) *Engine_Purge_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
var arg1 bool
if args[1] != nil {
arg1 = args[1].(bool)
}
run(
arg0,
arg1,
)
})
return _c
@@ -314,7 +320,7 @@ func (_c *Engine_Purge_Call) Return(err error) *Engine_Purge_Call {
return _c
}
func (_c *Engine_Purge_Call) RunAndReturn(run func(id string) error) *Engine_Purge_Call {
func (_c *Engine_Purge_Call) RunAndReturn(run func(id string, onlyDeleted bool) error) *Engine_Purge_Call {
_c.Call.Return(run)
return _c
}
@@ -130,6 +130,97 @@ func (_c *Searcher_MoveItem_Call) RunAndReturn(run func(ref *providerv1beta1.Ref
return _c
}
// PurgeDeleted provides a mock function for the type Searcher
func (_mock *Searcher) PurgeDeleted(spaceID *providerv1beta1.StorageSpaceId) error {
ret := _mock.Called(spaceID)
if len(ret) == 0 {
panic("no return value specified for PurgeDeleted")
}
var r0 error
if returnFunc, ok := ret.Get(0).(func(*providerv1beta1.StorageSpaceId) error); ok {
r0 = returnFunc(spaceID)
} else {
r0 = ret.Error(0)
}
return r0
}
// Searcher_PurgeDeleted_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PurgeDeleted'
type Searcher_PurgeDeleted_Call struct {
*mock.Call
}
// PurgeDeleted is a helper method to define mock.On call
// - spaceID *providerv1beta1.StorageSpaceId
func (_e *Searcher_Expecter) PurgeDeleted(spaceID interface{}) *Searcher_PurgeDeleted_Call {
return &Searcher_PurgeDeleted_Call{Call: _e.mock.On("PurgeDeleted", spaceID)}
}
func (_c *Searcher_PurgeDeleted_Call) Run(run func(spaceID *providerv1beta1.StorageSpaceId)) *Searcher_PurgeDeleted_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 *providerv1beta1.StorageSpaceId
if args[0] != nil {
arg0 = args[0].(*providerv1beta1.StorageSpaceId)
}
run(
arg0,
)
})
return _c
}
func (_c *Searcher_PurgeDeleted_Call) Return(err error) *Searcher_PurgeDeleted_Call {
_c.Call.Return(err)
return _c
}
func (_c *Searcher_PurgeDeleted_Call) RunAndReturn(run func(spaceID *providerv1beta1.StorageSpaceId) error) *Searcher_PurgeDeleted_Call {
_c.Call.Return(run)
return _c
}
// PurgeItem provides a mock function for the type Searcher
func (_mock *Searcher) PurgeItem(rID *providerv1beta1.Reference) {
_mock.Called(rID)
return
}
// Searcher_PurgeItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PurgeItem'
type Searcher_PurgeItem_Call struct {
*mock.Call
}
// PurgeItem is a helper method to define mock.On call
// - rID *providerv1beta1.Reference
func (_e *Searcher_Expecter) PurgeItem(rID interface{}) *Searcher_PurgeItem_Call {
return &Searcher_PurgeItem_Call{Call: _e.mock.On("PurgeItem", rID)}
}
func (_c *Searcher_PurgeItem_Call) Run(run func(rID *providerv1beta1.Reference)) *Searcher_PurgeItem_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 *providerv1beta1.Reference
if args[0] != nil {
arg0 = args[0].(*providerv1beta1.Reference)
}
run(
arg0,
)
})
return _c
}
func (_c *Searcher_PurgeItem_Call) Return() *Searcher_PurgeItem_Call {
_c.Call.Return()
return _c
}
func (_c *Searcher_PurgeItem_Call) RunAndReturn(run func(rID *providerv1beta1.Reference)) *Searcher_PurgeItem_Call {
_c.Run(run)
return _c
}
// RestoreItem provides a mock function for the type Searcher
func (_mock *Searcher) RestoreItem(ref *providerv1beta1.Reference) {
_mock.Called(ref)