// Code generated by mockery v2.53.0. DO NOT EDIT. package queue import ( context "context" model "codeberg.org/crowci/crow/v3/server/model" mock "github.com/stretchr/testify/mock" queue "codeberg.org/crowci/crow/v3/server/queue" ) // MockQueue is an autogenerated mock type for the Queue type type MockQueue struct { mock.Mock } type MockQueue_Expecter struct { mock *mock.Mock } func (_m *MockQueue) EXPECT() *MockQueue_Expecter { return &MockQueue_Expecter{mock: &_m.Mock} } // Done provides a mock function with given fields: c, id, exitStatus func (_m *MockQueue) Done(c context.Context, id string, exitStatus model.StatusValue) error { ret := _m.Called(c, id, exitStatus) if len(ret) == 0 { panic("no return value specified for Done") } var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, model.StatusValue) error); ok { r0 = rf(c, id, exitStatus) } else { r0 = ret.Error(0) } return r0 } // MockQueue_Done_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Done' type MockQueue_Done_Call struct { *mock.Call } // Done is a helper method to define mock.On call // - c context.Context // - id string // - exitStatus model.StatusValue func (_e *MockQueue_Expecter) Done(c interface{}, id interface{}, exitStatus interface{}) *MockQueue_Done_Call { return &MockQueue_Done_Call{Call: _e.mock.On("Done", c, id, exitStatus)} } func (_c *MockQueue_Done_Call) Run(run func(c context.Context, id string, exitStatus model.StatusValue)) *MockQueue_Done_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(string), args[2].(model.StatusValue)) }) return _c } func (_c *MockQueue_Done_Call) Return(_a0 error) *MockQueue_Done_Call { _c.Call.Return(_a0) return _c } func (_c *MockQueue_Done_Call) RunAndReturn(run func(context.Context, string, model.StatusValue) error) *MockQueue_Done_Call { _c.Call.Return(run) return _c } // Error provides a mock function with given fields: c, id, err func (_m *MockQueue) Error(c context.Context, id string, err error) error { ret := _m.Called(c, id, err) if len(ret) == 0 { panic("no return value specified for Error") } var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, error) error); ok { r0 = rf(c, id, err) } else { r0 = ret.Error(0) } return r0 } // MockQueue_Error_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Error' type MockQueue_Error_Call struct { *mock.Call } // Error is a helper method to define mock.On call // - c context.Context // - id string // - err error func (_e *MockQueue_Expecter) Error(c interface{}, id interface{}, err interface{}) *MockQueue_Error_Call { return &MockQueue_Error_Call{Call: _e.mock.On("Error", c, id, err)} } func (_c *MockQueue_Error_Call) Run(run func(c context.Context, id string, err error)) *MockQueue_Error_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(string), args[2].(error)) }) return _c } func (_c *MockQueue_Error_Call) Return(_a0 error) *MockQueue_Error_Call { _c.Call.Return(_a0) return _c } func (_c *MockQueue_Error_Call) RunAndReturn(run func(context.Context, string, error) error) *MockQueue_Error_Call { _c.Call.Return(run) return _c } // ErrorAtOnce provides a mock function with given fields: c, ids, err func (_m *MockQueue) ErrorAtOnce(c context.Context, ids []string, err error) error { ret := _m.Called(c, ids, err) if len(ret) == 0 { panic("no return value specified for ErrorAtOnce") } var r0 error if rf, ok := ret.Get(0).(func(context.Context, []string, error) error); ok { r0 = rf(c, ids, err) } else { r0 = ret.Error(0) } return r0 } // MockQueue_ErrorAtOnce_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ErrorAtOnce' type MockQueue_ErrorAtOnce_Call struct { *mock.Call } // ErrorAtOnce is a helper method to define mock.On call // - c context.Context // - ids []string // - err error func (_e *MockQueue_Expecter) ErrorAtOnce(c interface{}, ids interface{}, err interface{}) *MockQueue_ErrorAtOnce_Call { return &MockQueue_ErrorAtOnce_Call{Call: _e.mock.On("ErrorAtOnce", c, ids, err)} } func (_c *MockQueue_ErrorAtOnce_Call) Run(run func(c context.Context, ids []string, err error)) *MockQueue_ErrorAtOnce_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].([]string), args[2].(error)) }) return _c } func (_c *MockQueue_ErrorAtOnce_Call) Return(_a0 error) *MockQueue_ErrorAtOnce_Call { _c.Call.Return(_a0) return _c } func (_c *MockQueue_ErrorAtOnce_Call) RunAndReturn(run func(context.Context, []string, error) error) *MockQueue_ErrorAtOnce_Call { _c.Call.Return(run) return _c } // Evict provides a mock function with given fields: c, id func (_m *MockQueue) Evict(c context.Context, id string) error { ret := _m.Called(c, id) if len(ret) == 0 { panic("no return value specified for Evict") } var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(c, id) } else { r0 = ret.Error(0) } return r0 } // MockQueue_Evict_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Evict' type MockQueue_Evict_Call struct { *mock.Call } // Evict is a helper method to define mock.On call // - c context.Context // - id string func (_e *MockQueue_Expecter) Evict(c interface{}, id interface{}) *MockQueue_Evict_Call { return &MockQueue_Evict_Call{Call: _e.mock.On("Evict", c, id)} } func (_c *MockQueue_Evict_Call) Run(run func(c context.Context, id string)) *MockQueue_Evict_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(string)) }) return _c } func (_c *MockQueue_Evict_Call) Return(_a0 error) *MockQueue_Evict_Call { _c.Call.Return(_a0) return _c } func (_c *MockQueue_Evict_Call) RunAndReturn(run func(context.Context, string) error) *MockQueue_Evict_Call { _c.Call.Return(run) return _c } // EvictAtOnce provides a mock function with given fields: c, ids func (_m *MockQueue) EvictAtOnce(c context.Context, ids []string) error { ret := _m.Called(c, ids) if len(ret) == 0 { panic("no return value specified for EvictAtOnce") } var r0 error if rf, ok := ret.Get(0).(func(context.Context, []string) error); ok { r0 = rf(c, ids) } else { r0 = ret.Error(0) } return r0 } // MockQueue_EvictAtOnce_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EvictAtOnce' type MockQueue_EvictAtOnce_Call struct { *mock.Call } // EvictAtOnce is a helper method to define mock.On call // - c context.Context // - ids []string func (_e *MockQueue_Expecter) EvictAtOnce(c interface{}, ids interface{}) *MockQueue_EvictAtOnce_Call { return &MockQueue_EvictAtOnce_Call{Call: _e.mock.On("EvictAtOnce", c, ids)} } func (_c *MockQueue_EvictAtOnce_Call) Run(run func(c context.Context, ids []string)) *MockQueue_EvictAtOnce_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].([]string)) }) return _c } func (_c *MockQueue_EvictAtOnce_Call) Return(_a0 error) *MockQueue_EvictAtOnce_Call { _c.Call.Return(_a0) return _c } func (_c *MockQueue_EvictAtOnce_Call) RunAndReturn(run func(context.Context, []string) error) *MockQueue_EvictAtOnce_Call { _c.Call.Return(run) return _c } // Extend provides a mock function with given fields: c, agentID, workflowID func (_m *MockQueue) Extend(c context.Context, agentID int64, workflowID string) error { ret := _m.Called(c, agentID, workflowID) if len(ret) == 0 { panic("no return value specified for Extend") } var r0 error if rf, ok := ret.Get(0).(func(context.Context, int64, string) error); ok { r0 = rf(c, agentID, workflowID) } else { r0 = ret.Error(0) } return r0 } // MockQueue_Extend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Extend' type MockQueue_Extend_Call struct { *mock.Call } // Extend is a helper method to define mock.On call // - c context.Context // - agentID int64 // - workflowID string func (_e *MockQueue_Expecter) Extend(c interface{}, agentID interface{}, workflowID interface{}) *MockQueue_Extend_Call { return &MockQueue_Extend_Call{Call: _e.mock.On("Extend", c, agentID, workflowID)} } func (_c *MockQueue_Extend_Call) Run(run func(c context.Context, agentID int64, workflowID string)) *MockQueue_Extend_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(int64), args[2].(string)) }) return _c } func (_c *MockQueue_Extend_Call) Return(_a0 error) *MockQueue_Extend_Call { _c.Call.Return(_a0) return _c } func (_c *MockQueue_Extend_Call) RunAndReturn(run func(context.Context, int64, string) error) *MockQueue_Extend_Call { _c.Call.Return(run) return _c } // Info provides a mock function with given fields: c func (_m *MockQueue) Info(c context.Context) queue.InfoT { ret := _m.Called(c) if len(ret) == 0 { panic("no return value specified for Info") } var r0 queue.InfoT if rf, ok := ret.Get(0).(func(context.Context) queue.InfoT); ok { r0 = rf(c) } else { r0 = ret.Get(0).(queue.InfoT) } return r0 } // MockQueue_Info_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Info' type MockQueue_Info_Call struct { *mock.Call } // Info is a helper method to define mock.On call // - c context.Context func (_e *MockQueue_Expecter) Info(c interface{}) *MockQueue_Info_Call { return &MockQueue_Info_Call{Call: _e.mock.On("Info", c)} } func (_c *MockQueue_Info_Call) Run(run func(c context.Context)) *MockQueue_Info_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context)) }) return _c } func (_c *MockQueue_Info_Call) Return(_a0 queue.InfoT) *MockQueue_Info_Call { _c.Call.Return(_a0) return _c } func (_c *MockQueue_Info_Call) RunAndReturn(run func(context.Context) queue.InfoT) *MockQueue_Info_Call { _c.Call.Return(run) return _c } // KickAgentWorkers provides a mock function with given fields: agentID func (_m *MockQueue) KickAgentWorkers(agentID int64) { _m.Called(agentID) } // MockQueue_KickAgentWorkers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'KickAgentWorkers' type MockQueue_KickAgentWorkers_Call struct { *mock.Call } // KickAgentWorkers is a helper method to define mock.On call // - agentID int64 func (_e *MockQueue_Expecter) KickAgentWorkers(agentID interface{}) *MockQueue_KickAgentWorkers_Call { return &MockQueue_KickAgentWorkers_Call{Call: _e.mock.On("KickAgentWorkers", agentID)} } func (_c *MockQueue_KickAgentWorkers_Call) Run(run func(agentID int64)) *MockQueue_KickAgentWorkers_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(int64)) }) return _c } func (_c *MockQueue_KickAgentWorkers_Call) Return() *MockQueue_KickAgentWorkers_Call { _c.Call.Return() return _c } func (_c *MockQueue_KickAgentWorkers_Call) RunAndReturn(run func(int64)) *MockQueue_KickAgentWorkers_Call { _c.Run(run) return _c } // Pause provides a mock function with no fields func (_m *MockQueue) Pause() { _m.Called() } // MockQueue_Pause_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Pause' type MockQueue_Pause_Call struct { *mock.Call } // Pause is a helper method to define mock.On call func (_e *MockQueue_Expecter) Pause() *MockQueue_Pause_Call { return &MockQueue_Pause_Call{Call: _e.mock.On("Pause")} } func (_c *MockQueue_Pause_Call) Run(run func()) *MockQueue_Pause_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockQueue_Pause_Call) Return() *MockQueue_Pause_Call { _c.Call.Return() return _c } func (_c *MockQueue_Pause_Call) RunAndReturn(run func()) *MockQueue_Pause_Call { _c.Run(run) return _c } // Poll provides a mock function with given fields: c, agentID, f func (_m *MockQueue) Poll(c context.Context, agentID int64, f queue.FilterFn) (*model.Task, error) { ret := _m.Called(c, agentID, f) if len(ret) == 0 { panic("no return value specified for Poll") } var r0 *model.Task var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, queue.FilterFn) (*model.Task, error)); ok { return rf(c, agentID, f) } if rf, ok := ret.Get(0).(func(context.Context, int64, queue.FilterFn) *model.Task); ok { r0 = rf(c, agentID, f) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*model.Task) } } if rf, ok := ret.Get(1).(func(context.Context, int64, queue.FilterFn) error); ok { r1 = rf(c, agentID, f) } else { r1 = ret.Error(1) } return r0, r1 } // MockQueue_Poll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Poll' type MockQueue_Poll_Call struct { *mock.Call } // Poll is a helper method to define mock.On call // - c context.Context // - agentID int64 // - f queue.FilterFn func (_e *MockQueue_Expecter) Poll(c interface{}, agentID interface{}, f interface{}) *MockQueue_Poll_Call { return &MockQueue_Poll_Call{Call: _e.mock.On("Poll", c, agentID, f)} } func (_c *MockQueue_Poll_Call) Run(run func(c context.Context, agentID int64, f queue.FilterFn)) *MockQueue_Poll_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(int64), args[2].(queue.FilterFn)) }) return _c } func (_c *MockQueue_Poll_Call) Return(_a0 *model.Task, _a1 error) *MockQueue_Poll_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *MockQueue_Poll_Call) RunAndReturn(run func(context.Context, int64, queue.FilterFn) (*model.Task, error)) *MockQueue_Poll_Call { _c.Call.Return(run) return _c } // Push provides a mock function with given fields: c, task func (_m *MockQueue) Push(c context.Context, task *model.Task) error { ret := _m.Called(c, task) if len(ret) == 0 { panic("no return value specified for Push") } var r0 error if rf, ok := ret.Get(0).(func(context.Context, *model.Task) error); ok { r0 = rf(c, task) } else { r0 = ret.Error(0) } return r0 } // MockQueue_Push_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Push' type MockQueue_Push_Call struct { *mock.Call } // Push is a helper method to define mock.On call // - c context.Context // - task *model.Task func (_e *MockQueue_Expecter) Push(c interface{}, task interface{}) *MockQueue_Push_Call { return &MockQueue_Push_Call{Call: _e.mock.On("Push", c, task)} } func (_c *MockQueue_Push_Call) Run(run func(c context.Context, task *model.Task)) *MockQueue_Push_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*model.Task)) }) return _c } func (_c *MockQueue_Push_Call) Return(_a0 error) *MockQueue_Push_Call { _c.Call.Return(_a0) return _c } func (_c *MockQueue_Push_Call) RunAndReturn(run func(context.Context, *model.Task) error) *MockQueue_Push_Call { _c.Call.Return(run) return _c } // PushAtOnce provides a mock function with given fields: c, tasks func (_m *MockQueue) PushAtOnce(c context.Context, tasks []*model.Task) error { ret := _m.Called(c, tasks) if len(ret) == 0 { panic("no return value specified for PushAtOnce") } var r0 error if rf, ok := ret.Get(0).(func(context.Context, []*model.Task) error); ok { r0 = rf(c, tasks) } else { r0 = ret.Error(0) } return r0 } // MockQueue_PushAtOnce_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PushAtOnce' type MockQueue_PushAtOnce_Call struct { *mock.Call } // PushAtOnce is a helper method to define mock.On call // - c context.Context // - tasks []*model.Task func (_e *MockQueue_Expecter) PushAtOnce(c interface{}, tasks interface{}) *MockQueue_PushAtOnce_Call { return &MockQueue_PushAtOnce_Call{Call: _e.mock.On("PushAtOnce", c, tasks)} } func (_c *MockQueue_PushAtOnce_Call) Run(run func(c context.Context, tasks []*model.Task)) *MockQueue_PushAtOnce_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].([]*model.Task)) }) return _c } func (_c *MockQueue_PushAtOnce_Call) Return(_a0 error) *MockQueue_PushAtOnce_Call { _c.Call.Return(_a0) return _c } func (_c *MockQueue_PushAtOnce_Call) RunAndReturn(run func(context.Context, []*model.Task) error) *MockQueue_PushAtOnce_Call { _c.Call.Return(run) return _c } // Resume provides a mock function with no fields func (_m *MockQueue) Resume() { _m.Called() } // MockQueue_Resume_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Resume' type MockQueue_Resume_Call struct { *mock.Call } // Resume is a helper method to define mock.On call func (_e *MockQueue_Expecter) Resume() *MockQueue_Resume_Call { return &MockQueue_Resume_Call{Call: _e.mock.On("Resume")} } func (_c *MockQueue_Resume_Call) Run(run func()) *MockQueue_Resume_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockQueue_Resume_Call) Return() *MockQueue_Resume_Call { _c.Call.Return() return _c } func (_c *MockQueue_Resume_Call) RunAndReturn(run func()) *MockQueue_Resume_Call { _c.Run(run) return _c } // Wait provides a mock function with given fields: c, id func (_m *MockQueue) Wait(c context.Context, id string) error { ret := _m.Called(c, id) if len(ret) == 0 { panic("no return value specified for Wait") } var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(c, id) } else { r0 = ret.Error(0) } return r0 } // MockQueue_Wait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Wait' type MockQueue_Wait_Call struct { *mock.Call } // Wait is a helper method to define mock.On call // - c context.Context // - id string func (_e *MockQueue_Expecter) Wait(c interface{}, id interface{}) *MockQueue_Wait_Call { return &MockQueue_Wait_Call{Call: _e.mock.On("Wait", c, id)} } func (_c *MockQueue_Wait_Call) Run(run func(c context.Context, id string)) *MockQueue_Wait_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(string)) }) return _c } func (_c *MockQueue_Wait_Call) Return(_a0 error) *MockQueue_Wait_Call { _c.Call.Return(_a0) return _c } func (_c *MockQueue_Wait_Call) RunAndReturn(run func(context.Context, string) error) *MockQueue_Wait_Call { _c.Call.Return(run) return _c } // NewMockQueue creates a new instance of MockQueue. 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 NewMockQueue(t interface { mock.TestingT Cleanup(func()) }) *MockQueue { mock := &MockQueue{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }