// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package actions import ( "context" "github.com/google/uuid" mock "github.com/stretchr/testify/mock" ) // NewMockActionsService creates a new instance of MockActionsService. 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 NewMockActionsService(t interface { mock.TestingT Cleanup(func()) }) *MockActionsService { mock := &MockActionsService{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockActionsService is an autogenerated mock type for the ActionsService type type MockActionsService struct { mock.Mock } type MockActionsService_Expecter struct { mock *mock.Mock } func (_m *MockActionsService) EXPECT() *MockActionsService_Expecter { return &MockActionsService_Expecter{mock: &_m.Mock} } // AcquireJobs provides a mock function for the type MockActionsService func (_mock *MockActionsService) AcquireJobs(ctx context.Context, runnerScaleSetId int, messageQueueAccessToken string, requestIds []int64) ([]int64, error) { ret := _mock.Called(ctx, runnerScaleSetId, messageQueueAccessToken, requestIds) if len(ret) == 0 { panic("no return value specified for AcquireJobs") } var r0 []int64 var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, int, string, []int64) ([]int64, error)); ok { return returnFunc(ctx, runnerScaleSetId, messageQueueAccessToken, requestIds) } if returnFunc, ok := ret.Get(0).(func(context.Context, int, string, []int64) []int64); ok { r0 = returnFunc(ctx, runnerScaleSetId, messageQueueAccessToken, requestIds) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]int64) } } if returnFunc, ok := ret.Get(1).(func(context.Context, int, string, []int64) error); ok { r1 = returnFunc(ctx, runnerScaleSetId, messageQueueAccessToken, requestIds) } else { r1 = ret.Error(1) } return r0, r1 } // MockActionsService_AcquireJobs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AcquireJobs' type MockActionsService_AcquireJobs_Call struct { *mock.Call } // AcquireJobs is a helper method to define mock.On call // - ctx context.Context // - runnerScaleSetId int // - messageQueueAccessToken string // - requestIds []int64 func (_e *MockActionsService_Expecter) AcquireJobs(ctx interface{}, runnerScaleSetId interface{}, messageQueueAccessToken interface{}, requestIds interface{}) *MockActionsService_AcquireJobs_Call { return &MockActionsService_AcquireJobs_Call{Call: _e.mock.On("AcquireJobs", ctx, runnerScaleSetId, messageQueueAccessToken, requestIds)} } func (_c *MockActionsService_AcquireJobs_Call) Run(run func(ctx context.Context, runnerScaleSetId int, messageQueueAccessToken string, requestIds []int64)) *MockActionsService_AcquireJobs_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 int if args[1] != nil { arg1 = args[1].(int) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } var arg3 []int64 if args[3] != nil { arg3 = args[3].([]int64) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *MockActionsService_AcquireJobs_Call) Return(int64s []int64, err error) *MockActionsService_AcquireJobs_Call { _c.Call.Return(int64s, err) return _c } func (_c *MockActionsService_AcquireJobs_Call) RunAndReturn(run func(ctx context.Context, runnerScaleSetId int, messageQueueAccessToken string, requestIds []int64) ([]int64, error)) *MockActionsService_AcquireJobs_Call { _c.Call.Return(run) return _c } // CreateMessageSession provides a mock function for the type MockActionsService func (_mock *MockActionsService) CreateMessageSession(ctx context.Context, runnerScaleSetId int, owner string) (*RunnerScaleSetSession, error) { ret := _mock.Called(ctx, runnerScaleSetId, owner) if len(ret) == 0 { panic("no return value specified for CreateMessageSession") } var r0 *RunnerScaleSetSession var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, int, string) (*RunnerScaleSetSession, error)); ok { return returnFunc(ctx, runnerScaleSetId, owner) } if returnFunc, ok := ret.Get(0).(func(context.Context, int, string) *RunnerScaleSetSession); ok { r0 = returnFunc(ctx, runnerScaleSetId, owner) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*RunnerScaleSetSession) } } if returnFunc, ok := ret.Get(1).(func(context.Context, int, string) error); ok { r1 = returnFunc(ctx, runnerScaleSetId, owner) } else { r1 = ret.Error(1) } return r0, r1 } // MockActionsService_CreateMessageSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateMessageSession' type MockActionsService_CreateMessageSession_Call struct { *mock.Call } // CreateMessageSession is a helper method to define mock.On call // - ctx context.Context // - runnerScaleSetId int // - owner string func (_e *MockActionsService_Expecter) CreateMessageSession(ctx interface{}, runnerScaleSetId interface{}, owner interface{}) *MockActionsService_CreateMessageSession_Call { return &MockActionsService_CreateMessageSession_Call{Call: _e.mock.On("CreateMessageSession", ctx, runnerScaleSetId, owner)} } func (_c *MockActionsService_CreateMessageSession_Call) Run(run func(ctx context.Context, runnerScaleSetId int, owner string)) *MockActionsService_CreateMessageSession_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 int if args[1] != nil { arg1 = args[1].(int) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockActionsService_CreateMessageSession_Call) Return(runnerScaleSetSession *RunnerScaleSetSession, err error) *MockActionsService_CreateMessageSession_Call { _c.Call.Return(runnerScaleSetSession, err) return _c } func (_c *MockActionsService_CreateMessageSession_Call) RunAndReturn(run func(ctx context.Context, runnerScaleSetId int, owner string) (*RunnerScaleSetSession, error)) *MockActionsService_CreateMessageSession_Call { _c.Call.Return(run) return _c } // CreateRunnerScaleSet provides a mock function for the type MockActionsService func (_mock *MockActionsService) CreateRunnerScaleSet(ctx context.Context, runnerScaleSet *RunnerScaleSet) (*RunnerScaleSet, error) { ret := _mock.Called(ctx, runnerScaleSet) if len(ret) == 0 { panic("no return value specified for CreateRunnerScaleSet") } var r0 *RunnerScaleSet var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, *RunnerScaleSet) (*RunnerScaleSet, error)); ok { return returnFunc(ctx, runnerScaleSet) } if returnFunc, ok := ret.Get(0).(func(context.Context, *RunnerScaleSet) *RunnerScaleSet); ok { r0 = returnFunc(ctx, runnerScaleSet) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*RunnerScaleSet) } } if returnFunc, ok := ret.Get(1).(func(context.Context, *RunnerScaleSet) error); ok { r1 = returnFunc(ctx, runnerScaleSet) } else { r1 = ret.Error(1) } return r0, r1 } // MockActionsService_CreateRunnerScaleSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRunnerScaleSet' type MockActionsService_CreateRunnerScaleSet_Call struct { *mock.Call } // CreateRunnerScaleSet is a helper method to define mock.On call // - ctx context.Context // - runnerScaleSet *RunnerScaleSet func (_e *MockActionsService_Expecter) CreateRunnerScaleSet(ctx interface{}, runnerScaleSet interface{}) *MockActionsService_CreateRunnerScaleSet_Call { return &MockActionsService_CreateRunnerScaleSet_Call{Call: _e.mock.On("CreateRunnerScaleSet", ctx, runnerScaleSet)} } func (_c *MockActionsService_CreateRunnerScaleSet_Call) Run(run func(ctx context.Context, runnerScaleSet *RunnerScaleSet)) *MockActionsService_CreateRunnerScaleSet_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 *RunnerScaleSet if args[1] != nil { arg1 = args[1].(*RunnerScaleSet) } run( arg0, arg1, ) }) return _c } func (_c *MockActionsService_CreateRunnerScaleSet_Call) Return(runnerScaleSet1 *RunnerScaleSet, err error) *MockActionsService_CreateRunnerScaleSet_Call { _c.Call.Return(runnerScaleSet1, err) return _c } func (_c *MockActionsService_CreateRunnerScaleSet_Call) RunAndReturn(run func(ctx context.Context, runnerScaleSet *RunnerScaleSet) (*RunnerScaleSet, error)) *MockActionsService_CreateRunnerScaleSet_Call { _c.Call.Return(run) return _c } // DeleteMessage provides a mock function for the type MockActionsService func (_mock *MockActionsService) DeleteMessage(ctx context.Context, messageQueueUrl string, messageQueueAccessToken string, messageId int64) error { ret := _mock.Called(ctx, messageQueueUrl, messageQueueAccessToken, messageId) if len(ret) == 0 { panic("no return value specified for DeleteMessage") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, int64) error); ok { r0 = returnFunc(ctx, messageQueueUrl, messageQueueAccessToken, messageId) } else { r0 = ret.Error(0) } return r0 } // MockActionsService_DeleteMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteMessage' type MockActionsService_DeleteMessage_Call struct { *mock.Call } // DeleteMessage is a helper method to define mock.On call // - ctx context.Context // - messageQueueUrl string // - messageQueueAccessToken string // - messageId int64 func (_e *MockActionsService_Expecter) DeleteMessage(ctx interface{}, messageQueueUrl interface{}, messageQueueAccessToken interface{}, messageId interface{}) *MockActionsService_DeleteMessage_Call { return &MockActionsService_DeleteMessage_Call{Call: _e.mock.On("DeleteMessage", ctx, messageQueueUrl, messageQueueAccessToken, messageId)} } func (_c *MockActionsService_DeleteMessage_Call) Run(run func(ctx context.Context, messageQueueUrl string, messageQueueAccessToken string, messageId int64)) *MockActionsService_DeleteMessage_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } var arg3 int64 if args[3] != nil { arg3 = args[3].(int64) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *MockActionsService_DeleteMessage_Call) Return(err error) *MockActionsService_DeleteMessage_Call { _c.Call.Return(err) return _c } func (_c *MockActionsService_DeleteMessage_Call) RunAndReturn(run func(ctx context.Context, messageQueueUrl string, messageQueueAccessToken string, messageId int64) error) *MockActionsService_DeleteMessage_Call { _c.Call.Return(run) return _c } // DeleteMessageSession provides a mock function for the type MockActionsService func (_mock *MockActionsService) DeleteMessageSession(ctx context.Context, runnerScaleSetId int, sessionId *uuid.UUID) error { ret := _mock.Called(ctx, runnerScaleSetId, sessionId) if len(ret) == 0 { panic("no return value specified for DeleteMessageSession") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, int, *uuid.UUID) error); ok { r0 = returnFunc(ctx, runnerScaleSetId, sessionId) } else { r0 = ret.Error(0) } return r0 } // MockActionsService_DeleteMessageSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteMessageSession' type MockActionsService_DeleteMessageSession_Call struct { *mock.Call } // DeleteMessageSession is a helper method to define mock.On call // - ctx context.Context // - runnerScaleSetId int // - sessionId *uuid.UUID func (_e *MockActionsService_Expecter) DeleteMessageSession(ctx interface{}, runnerScaleSetId interface{}, sessionId interface{}) *MockActionsService_DeleteMessageSession_Call { return &MockActionsService_DeleteMessageSession_Call{Call: _e.mock.On("DeleteMessageSession", ctx, runnerScaleSetId, sessionId)} } func (_c *MockActionsService_DeleteMessageSession_Call) Run(run func(ctx context.Context, runnerScaleSetId int, sessionId *uuid.UUID)) *MockActionsService_DeleteMessageSession_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 int if args[1] != nil { arg1 = args[1].(int) } var arg2 *uuid.UUID if args[2] != nil { arg2 = args[2].(*uuid.UUID) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockActionsService_DeleteMessageSession_Call) Return(err error) *MockActionsService_DeleteMessageSession_Call { _c.Call.Return(err) return _c } func (_c *MockActionsService_DeleteMessageSession_Call) RunAndReturn(run func(ctx context.Context, runnerScaleSetId int, sessionId *uuid.UUID) error) *MockActionsService_DeleteMessageSession_Call { _c.Call.Return(run) return _c } // DeleteRunnerScaleSet provides a mock function for the type MockActionsService func (_mock *MockActionsService) DeleteRunnerScaleSet(ctx context.Context, runnerScaleSetId int) error { ret := _mock.Called(ctx, runnerScaleSetId) if len(ret) == 0 { panic("no return value specified for DeleteRunnerScaleSet") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, int) error); ok { r0 = returnFunc(ctx, runnerScaleSetId) } else { r0 = ret.Error(0) } return r0 } // MockActionsService_DeleteRunnerScaleSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRunnerScaleSet' type MockActionsService_DeleteRunnerScaleSet_Call struct { *mock.Call } // DeleteRunnerScaleSet is a helper method to define mock.On call // - ctx context.Context // - runnerScaleSetId int func (_e *MockActionsService_Expecter) DeleteRunnerScaleSet(ctx interface{}, runnerScaleSetId interface{}) *MockActionsService_DeleteRunnerScaleSet_Call { return &MockActionsService_DeleteRunnerScaleSet_Call{Call: _e.mock.On("DeleteRunnerScaleSet", ctx, runnerScaleSetId)} } func (_c *MockActionsService_DeleteRunnerScaleSet_Call) Run(run func(ctx context.Context, runnerScaleSetId int)) *MockActionsService_DeleteRunnerScaleSet_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 int if args[1] != nil { arg1 = args[1].(int) } run( arg0, arg1, ) }) return _c } func (_c *MockActionsService_DeleteRunnerScaleSet_Call) Return(err error) *MockActionsService_DeleteRunnerScaleSet_Call { _c.Call.Return(err) return _c } func (_c *MockActionsService_DeleteRunnerScaleSet_Call) RunAndReturn(run func(ctx context.Context, runnerScaleSetId int) error) *MockActionsService_DeleteRunnerScaleSet_Call { _c.Call.Return(run) return _c } // GenerateJitRunnerConfig provides a mock function for the type MockActionsService func (_mock *MockActionsService) GenerateJitRunnerConfig(ctx context.Context, jitRunnerSetting *RunnerScaleSetJitRunnerSetting, scaleSetId int) (*RunnerScaleSetJitRunnerConfig, error) { ret := _mock.Called(ctx, jitRunnerSetting, scaleSetId) if len(ret) == 0 { panic("no return value specified for GenerateJitRunnerConfig") } var r0 *RunnerScaleSetJitRunnerConfig var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, *RunnerScaleSetJitRunnerSetting, int) (*RunnerScaleSetJitRunnerConfig, error)); ok { return returnFunc(ctx, jitRunnerSetting, scaleSetId) } if returnFunc, ok := ret.Get(0).(func(context.Context, *RunnerScaleSetJitRunnerSetting, int) *RunnerScaleSetJitRunnerConfig); ok { r0 = returnFunc(ctx, jitRunnerSetting, scaleSetId) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*RunnerScaleSetJitRunnerConfig) } } if returnFunc, ok := ret.Get(1).(func(context.Context, *RunnerScaleSetJitRunnerSetting, int) error); ok { r1 = returnFunc(ctx, jitRunnerSetting, scaleSetId) } else { r1 = ret.Error(1) } return r0, r1 } // MockActionsService_GenerateJitRunnerConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateJitRunnerConfig' type MockActionsService_GenerateJitRunnerConfig_Call struct { *mock.Call } // GenerateJitRunnerConfig is a helper method to define mock.On call // - ctx context.Context // - jitRunnerSetting *RunnerScaleSetJitRunnerSetting // - scaleSetId int func (_e *MockActionsService_Expecter) GenerateJitRunnerConfig(ctx interface{}, jitRunnerSetting interface{}, scaleSetId interface{}) *MockActionsService_GenerateJitRunnerConfig_Call { return &MockActionsService_GenerateJitRunnerConfig_Call{Call: _e.mock.On("GenerateJitRunnerConfig", ctx, jitRunnerSetting, scaleSetId)} } func (_c *MockActionsService_GenerateJitRunnerConfig_Call) Run(run func(ctx context.Context, jitRunnerSetting *RunnerScaleSetJitRunnerSetting, scaleSetId int)) *MockActionsService_GenerateJitRunnerConfig_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 *RunnerScaleSetJitRunnerSetting if args[1] != nil { arg1 = args[1].(*RunnerScaleSetJitRunnerSetting) } var arg2 int if args[2] != nil { arg2 = args[2].(int) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockActionsService_GenerateJitRunnerConfig_Call) Return(runnerScaleSetJitRunnerConfig *RunnerScaleSetJitRunnerConfig, err error) *MockActionsService_GenerateJitRunnerConfig_Call { _c.Call.Return(runnerScaleSetJitRunnerConfig, err) return _c } func (_c *MockActionsService_GenerateJitRunnerConfig_Call) RunAndReturn(run func(ctx context.Context, jitRunnerSetting *RunnerScaleSetJitRunnerSetting, scaleSetId int) (*RunnerScaleSetJitRunnerConfig, error)) *MockActionsService_GenerateJitRunnerConfig_Call { _c.Call.Return(run) return _c } // GetAcquirableJobs provides a mock function for the type MockActionsService func (_mock *MockActionsService) GetAcquirableJobs(ctx context.Context, runnerScaleSetId int) (*AcquirableJobList, error) { ret := _mock.Called(ctx, runnerScaleSetId) if len(ret) == 0 { panic("no return value specified for GetAcquirableJobs") } var r0 *AcquirableJobList var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, int) (*AcquirableJobList, error)); ok { return returnFunc(ctx, runnerScaleSetId) } if returnFunc, ok := ret.Get(0).(func(context.Context, int) *AcquirableJobList); ok { r0 = returnFunc(ctx, runnerScaleSetId) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*AcquirableJobList) } } if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { r1 = returnFunc(ctx, runnerScaleSetId) } else { r1 = ret.Error(1) } return r0, r1 } // MockActionsService_GetAcquirableJobs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAcquirableJobs' type MockActionsService_GetAcquirableJobs_Call struct { *mock.Call } // GetAcquirableJobs is a helper method to define mock.On call // - ctx context.Context // - runnerScaleSetId int func (_e *MockActionsService_Expecter) GetAcquirableJobs(ctx interface{}, runnerScaleSetId interface{}) *MockActionsService_GetAcquirableJobs_Call { return &MockActionsService_GetAcquirableJobs_Call{Call: _e.mock.On("GetAcquirableJobs", ctx, runnerScaleSetId)} } func (_c *MockActionsService_GetAcquirableJobs_Call) Run(run func(ctx context.Context, runnerScaleSetId int)) *MockActionsService_GetAcquirableJobs_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 int if args[1] != nil { arg1 = args[1].(int) } run( arg0, arg1, ) }) return _c } func (_c *MockActionsService_GetAcquirableJobs_Call) Return(acquirableJobList *AcquirableJobList, err error) *MockActionsService_GetAcquirableJobs_Call { _c.Call.Return(acquirableJobList, err) return _c } func (_c *MockActionsService_GetAcquirableJobs_Call) RunAndReturn(run func(ctx context.Context, runnerScaleSetId int) (*AcquirableJobList, error)) *MockActionsService_GetAcquirableJobs_Call { _c.Call.Return(run) return _c } // GetMessage provides a mock function for the type MockActionsService func (_mock *MockActionsService) GetMessage(ctx context.Context, messageQueueUrl string, messageQueueAccessToken string, lastMessageId int64, maxCapacity int) (*RunnerScaleSetMessage, error) { ret := _mock.Called(ctx, messageQueueUrl, messageQueueAccessToken, lastMessageId, maxCapacity) if len(ret) == 0 { panic("no return value specified for GetMessage") } var r0 *RunnerScaleSetMessage var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, int64, int) (*RunnerScaleSetMessage, error)); ok { return returnFunc(ctx, messageQueueUrl, messageQueueAccessToken, lastMessageId, maxCapacity) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, int64, int) *RunnerScaleSetMessage); ok { r0 = returnFunc(ctx, messageQueueUrl, messageQueueAccessToken, lastMessageId, maxCapacity) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*RunnerScaleSetMessage) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, int64, int) error); ok { r1 = returnFunc(ctx, messageQueueUrl, messageQueueAccessToken, lastMessageId, maxCapacity) } else { r1 = ret.Error(1) } return r0, r1 } // MockActionsService_GetMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMessage' type MockActionsService_GetMessage_Call struct { *mock.Call } // GetMessage is a helper method to define mock.On call // - ctx context.Context // - messageQueueUrl string // - messageQueueAccessToken string // - lastMessageId int64 // - maxCapacity int func (_e *MockActionsService_Expecter) GetMessage(ctx interface{}, messageQueueUrl interface{}, messageQueueAccessToken interface{}, lastMessageId interface{}, maxCapacity interface{}) *MockActionsService_GetMessage_Call { return &MockActionsService_GetMessage_Call{Call: _e.mock.On("GetMessage", ctx, messageQueueUrl, messageQueueAccessToken, lastMessageId, maxCapacity)} } func (_c *MockActionsService_GetMessage_Call) Run(run func(ctx context.Context, messageQueueUrl string, messageQueueAccessToken string, lastMessageId int64, maxCapacity int)) *MockActionsService_GetMessage_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } var arg3 int64 if args[3] != nil { arg3 = args[3].(int64) } var arg4 int if args[4] != nil { arg4 = args[4].(int) } run( arg0, arg1, arg2, arg3, arg4, ) }) return _c } func (_c *MockActionsService_GetMessage_Call) Return(runnerScaleSetMessage *RunnerScaleSetMessage, err error) *MockActionsService_GetMessage_Call { _c.Call.Return(runnerScaleSetMessage, err) return _c } func (_c *MockActionsService_GetMessage_Call) RunAndReturn(run func(ctx context.Context, messageQueueUrl string, messageQueueAccessToken string, lastMessageId int64, maxCapacity int) (*RunnerScaleSetMessage, error)) *MockActionsService_GetMessage_Call { _c.Call.Return(run) return _c } // GetRunner provides a mock function for the type MockActionsService func (_mock *MockActionsService) GetRunner(ctx context.Context, runnerId int64) (*RunnerReference, error) { ret := _mock.Called(ctx, runnerId) if len(ret) == 0 { panic("no return value specified for GetRunner") } var r0 *RunnerReference var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, int64) (*RunnerReference, error)); ok { return returnFunc(ctx, runnerId) } if returnFunc, ok := ret.Get(0).(func(context.Context, int64) *RunnerReference); ok { r0 = returnFunc(ctx, runnerId) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*RunnerReference) } } if returnFunc, ok := ret.Get(1).(func(context.Context, int64) error); ok { r1 = returnFunc(ctx, runnerId) } else { r1 = ret.Error(1) } return r0, r1 } // MockActionsService_GetRunner_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRunner' type MockActionsService_GetRunner_Call struct { *mock.Call } // GetRunner is a helper method to define mock.On call // - ctx context.Context // - runnerId int64 func (_e *MockActionsService_Expecter) GetRunner(ctx interface{}, runnerId interface{}) *MockActionsService_GetRunner_Call { return &MockActionsService_GetRunner_Call{Call: _e.mock.On("GetRunner", ctx, runnerId)} } func (_c *MockActionsService_GetRunner_Call) Run(run func(ctx context.Context, runnerId int64)) *MockActionsService_GetRunner_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 int64 if args[1] != nil { arg1 = args[1].(int64) } run( arg0, arg1, ) }) return _c } func (_c *MockActionsService_GetRunner_Call) Return(runnerReference *RunnerReference, err error) *MockActionsService_GetRunner_Call { _c.Call.Return(runnerReference, err) return _c } func (_c *MockActionsService_GetRunner_Call) RunAndReturn(run func(ctx context.Context, runnerId int64) (*RunnerReference, error)) *MockActionsService_GetRunner_Call { _c.Call.Return(run) return _c } // GetRunnerByName provides a mock function for the type MockActionsService func (_mock *MockActionsService) GetRunnerByName(ctx context.Context, runnerName string) (*RunnerReference, error) { ret := _mock.Called(ctx, runnerName) if len(ret) == 0 { panic("no return value specified for GetRunnerByName") } var r0 *RunnerReference var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*RunnerReference, error)); ok { return returnFunc(ctx, runnerName) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) *RunnerReference); ok { r0 = returnFunc(ctx, runnerName) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*RunnerReference) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, runnerName) } else { r1 = ret.Error(1) } return r0, r1 } // MockActionsService_GetRunnerByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRunnerByName' type MockActionsService_GetRunnerByName_Call struct { *mock.Call } // GetRunnerByName is a helper method to define mock.On call // - ctx context.Context // - runnerName string func (_e *MockActionsService_Expecter) GetRunnerByName(ctx interface{}, runnerName interface{}) *MockActionsService_GetRunnerByName_Call { return &MockActionsService_GetRunnerByName_Call{Call: _e.mock.On("GetRunnerByName", ctx, runnerName)} } func (_c *MockActionsService_GetRunnerByName_Call) Run(run func(ctx context.Context, runnerName string)) *MockActionsService_GetRunnerByName_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockActionsService_GetRunnerByName_Call) Return(runnerReference *RunnerReference, err error) *MockActionsService_GetRunnerByName_Call { _c.Call.Return(runnerReference, err) return _c } func (_c *MockActionsService_GetRunnerByName_Call) RunAndReturn(run func(ctx context.Context, runnerName string) (*RunnerReference, error)) *MockActionsService_GetRunnerByName_Call { _c.Call.Return(run) return _c } // GetRunnerGroupByName provides a mock function for the type MockActionsService func (_mock *MockActionsService) GetRunnerGroupByName(ctx context.Context, runnerGroup string) (*RunnerGroup, error) { ret := _mock.Called(ctx, runnerGroup) if len(ret) == 0 { panic("no return value specified for GetRunnerGroupByName") } var r0 *RunnerGroup var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*RunnerGroup, error)); ok { return returnFunc(ctx, runnerGroup) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) *RunnerGroup); ok { r0 = returnFunc(ctx, runnerGroup) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*RunnerGroup) } } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, runnerGroup) } else { r1 = ret.Error(1) } return r0, r1 } // MockActionsService_GetRunnerGroupByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRunnerGroupByName' type MockActionsService_GetRunnerGroupByName_Call struct { *mock.Call } // GetRunnerGroupByName is a helper method to define mock.On call // - ctx context.Context // - runnerGroup string func (_e *MockActionsService_Expecter) GetRunnerGroupByName(ctx interface{}, runnerGroup interface{}) *MockActionsService_GetRunnerGroupByName_Call { return &MockActionsService_GetRunnerGroupByName_Call{Call: _e.mock.On("GetRunnerGroupByName", ctx, runnerGroup)} } func (_c *MockActionsService_GetRunnerGroupByName_Call) Run(run func(ctx context.Context, runnerGroup string)) *MockActionsService_GetRunnerGroupByName_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockActionsService_GetRunnerGroupByName_Call) Return(runnerGroup1 *RunnerGroup, err error) *MockActionsService_GetRunnerGroupByName_Call { _c.Call.Return(runnerGroup1, err) return _c } func (_c *MockActionsService_GetRunnerGroupByName_Call) RunAndReturn(run func(ctx context.Context, runnerGroup string) (*RunnerGroup, error)) *MockActionsService_GetRunnerGroupByName_Call { _c.Call.Return(run) return _c } // GetRunnerScaleSet provides a mock function for the type MockActionsService func (_mock *MockActionsService) GetRunnerScaleSet(ctx context.Context, runnerGroupId int, runnerScaleSetName string) (*RunnerScaleSet, error) { ret := _mock.Called(ctx, runnerGroupId, runnerScaleSetName) if len(ret) == 0 { panic("no return value specified for GetRunnerScaleSet") } var r0 *RunnerScaleSet var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, int, string) (*RunnerScaleSet, error)); ok { return returnFunc(ctx, runnerGroupId, runnerScaleSetName) } if returnFunc, ok := ret.Get(0).(func(context.Context, int, string) *RunnerScaleSet); ok { r0 = returnFunc(ctx, runnerGroupId, runnerScaleSetName) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*RunnerScaleSet) } } if returnFunc, ok := ret.Get(1).(func(context.Context, int, string) error); ok { r1 = returnFunc(ctx, runnerGroupId, runnerScaleSetName) } else { r1 = ret.Error(1) } return r0, r1 } // MockActionsService_GetRunnerScaleSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRunnerScaleSet' type MockActionsService_GetRunnerScaleSet_Call struct { *mock.Call } // GetRunnerScaleSet is a helper method to define mock.On call // - ctx context.Context // - runnerGroupId int // - runnerScaleSetName string func (_e *MockActionsService_Expecter) GetRunnerScaleSet(ctx interface{}, runnerGroupId interface{}, runnerScaleSetName interface{}) *MockActionsService_GetRunnerScaleSet_Call { return &MockActionsService_GetRunnerScaleSet_Call{Call: _e.mock.On("GetRunnerScaleSet", ctx, runnerGroupId, runnerScaleSetName)} } func (_c *MockActionsService_GetRunnerScaleSet_Call) Run(run func(ctx context.Context, runnerGroupId int, runnerScaleSetName string)) *MockActionsService_GetRunnerScaleSet_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 int if args[1] != nil { arg1 = args[1].(int) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockActionsService_GetRunnerScaleSet_Call) Return(runnerScaleSet *RunnerScaleSet, err error) *MockActionsService_GetRunnerScaleSet_Call { _c.Call.Return(runnerScaleSet, err) return _c } func (_c *MockActionsService_GetRunnerScaleSet_Call) RunAndReturn(run func(ctx context.Context, runnerGroupId int, runnerScaleSetName string) (*RunnerScaleSet, error)) *MockActionsService_GetRunnerScaleSet_Call { _c.Call.Return(run) return _c } // GetRunnerScaleSetById provides a mock function for the type MockActionsService func (_mock *MockActionsService) GetRunnerScaleSetById(ctx context.Context, runnerScaleSetId int) (*RunnerScaleSet, error) { ret := _mock.Called(ctx, runnerScaleSetId) if len(ret) == 0 { panic("no return value specified for GetRunnerScaleSetById") } var r0 *RunnerScaleSet var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, int) (*RunnerScaleSet, error)); ok { return returnFunc(ctx, runnerScaleSetId) } if returnFunc, ok := ret.Get(0).(func(context.Context, int) *RunnerScaleSet); ok { r0 = returnFunc(ctx, runnerScaleSetId) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*RunnerScaleSet) } } if returnFunc, ok := ret.Get(1).(func(context.Context, int) error); ok { r1 = returnFunc(ctx, runnerScaleSetId) } else { r1 = ret.Error(1) } return r0, r1 } // MockActionsService_GetRunnerScaleSetById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRunnerScaleSetById' type MockActionsService_GetRunnerScaleSetById_Call struct { *mock.Call } // GetRunnerScaleSetById is a helper method to define mock.On call // - ctx context.Context // - runnerScaleSetId int func (_e *MockActionsService_Expecter) GetRunnerScaleSetById(ctx interface{}, runnerScaleSetId interface{}) *MockActionsService_GetRunnerScaleSetById_Call { return &MockActionsService_GetRunnerScaleSetById_Call{Call: _e.mock.On("GetRunnerScaleSetById", ctx, runnerScaleSetId)} } func (_c *MockActionsService_GetRunnerScaleSetById_Call) Run(run func(ctx context.Context, runnerScaleSetId int)) *MockActionsService_GetRunnerScaleSetById_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 int if args[1] != nil { arg1 = args[1].(int) } run( arg0, arg1, ) }) return _c } func (_c *MockActionsService_GetRunnerScaleSetById_Call) Return(runnerScaleSet *RunnerScaleSet, err error) *MockActionsService_GetRunnerScaleSetById_Call { _c.Call.Return(runnerScaleSet, err) return _c } func (_c *MockActionsService_GetRunnerScaleSetById_Call) RunAndReturn(run func(ctx context.Context, runnerScaleSetId int) (*RunnerScaleSet, error)) *MockActionsService_GetRunnerScaleSetById_Call { _c.Call.Return(run) return _c } // RefreshMessageSession provides a mock function for the type MockActionsService func (_mock *MockActionsService) RefreshMessageSession(ctx context.Context, runnerScaleSetId int, sessionId *uuid.UUID) (*RunnerScaleSetSession, error) { ret := _mock.Called(ctx, runnerScaleSetId, sessionId) if len(ret) == 0 { panic("no return value specified for RefreshMessageSession") } var r0 *RunnerScaleSetSession var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, int, *uuid.UUID) (*RunnerScaleSetSession, error)); ok { return returnFunc(ctx, runnerScaleSetId, sessionId) } if returnFunc, ok := ret.Get(0).(func(context.Context, int, *uuid.UUID) *RunnerScaleSetSession); ok { r0 = returnFunc(ctx, runnerScaleSetId, sessionId) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*RunnerScaleSetSession) } } if returnFunc, ok := ret.Get(1).(func(context.Context, int, *uuid.UUID) error); ok { r1 = returnFunc(ctx, runnerScaleSetId, sessionId) } else { r1 = ret.Error(1) } return r0, r1 } // MockActionsService_RefreshMessageSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RefreshMessageSession' type MockActionsService_RefreshMessageSession_Call struct { *mock.Call } // RefreshMessageSession is a helper method to define mock.On call // - ctx context.Context // - runnerScaleSetId int // - sessionId *uuid.UUID func (_e *MockActionsService_Expecter) RefreshMessageSession(ctx interface{}, runnerScaleSetId interface{}, sessionId interface{}) *MockActionsService_RefreshMessageSession_Call { return &MockActionsService_RefreshMessageSession_Call{Call: _e.mock.On("RefreshMessageSession", ctx, runnerScaleSetId, sessionId)} } func (_c *MockActionsService_RefreshMessageSession_Call) Run(run func(ctx context.Context, runnerScaleSetId int, sessionId *uuid.UUID)) *MockActionsService_RefreshMessageSession_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 int if args[1] != nil { arg1 = args[1].(int) } var arg2 *uuid.UUID if args[2] != nil { arg2 = args[2].(*uuid.UUID) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockActionsService_RefreshMessageSession_Call) Return(runnerScaleSetSession *RunnerScaleSetSession, err error) *MockActionsService_RefreshMessageSession_Call { _c.Call.Return(runnerScaleSetSession, err) return _c } func (_c *MockActionsService_RefreshMessageSession_Call) RunAndReturn(run func(ctx context.Context, runnerScaleSetId int, sessionId *uuid.UUID) (*RunnerScaleSetSession, error)) *MockActionsService_RefreshMessageSession_Call { _c.Call.Return(run) return _c } // RemoveRunner provides a mock function for the type MockActionsService func (_mock *MockActionsService) RemoveRunner(ctx context.Context, runnerId int64) error { ret := _mock.Called(ctx, runnerId) if len(ret) == 0 { panic("no return value specified for RemoveRunner") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, int64) error); ok { r0 = returnFunc(ctx, runnerId) } else { r0 = ret.Error(0) } return r0 } // MockActionsService_RemoveRunner_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveRunner' type MockActionsService_RemoveRunner_Call struct { *mock.Call } // RemoveRunner is a helper method to define mock.On call // - ctx context.Context // - runnerId int64 func (_e *MockActionsService_Expecter) RemoveRunner(ctx interface{}, runnerId interface{}) *MockActionsService_RemoveRunner_Call { return &MockActionsService_RemoveRunner_Call{Call: _e.mock.On("RemoveRunner", ctx, runnerId)} } func (_c *MockActionsService_RemoveRunner_Call) Run(run func(ctx context.Context, runnerId int64)) *MockActionsService_RemoveRunner_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 int64 if args[1] != nil { arg1 = args[1].(int64) } run( arg0, arg1, ) }) return _c } func (_c *MockActionsService_RemoveRunner_Call) Return(err error) *MockActionsService_RemoveRunner_Call { _c.Call.Return(err) return _c } func (_c *MockActionsService_RemoveRunner_Call) RunAndReturn(run func(ctx context.Context, runnerId int64) error) *MockActionsService_RemoveRunner_Call { _c.Call.Return(run) return _c } // SetUserAgent provides a mock function for the type MockActionsService func (_mock *MockActionsService) SetUserAgent(info UserAgentInfo) { _mock.Called(info) return } // MockActionsService_SetUserAgent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetUserAgent' type MockActionsService_SetUserAgent_Call struct { *mock.Call } // SetUserAgent is a helper method to define mock.On call // - info UserAgentInfo func (_e *MockActionsService_Expecter) SetUserAgent(info interface{}) *MockActionsService_SetUserAgent_Call { return &MockActionsService_SetUserAgent_Call{Call: _e.mock.On("SetUserAgent", info)} } func (_c *MockActionsService_SetUserAgent_Call) Run(run func(info UserAgentInfo)) *MockActionsService_SetUserAgent_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 UserAgentInfo if args[0] != nil { arg0 = args[0].(UserAgentInfo) } run( arg0, ) }) return _c } func (_c *MockActionsService_SetUserAgent_Call) Return() *MockActionsService_SetUserAgent_Call { _c.Call.Return() return _c } func (_c *MockActionsService_SetUserAgent_Call) RunAndReturn(run func(info UserAgentInfo)) *MockActionsService_SetUserAgent_Call { _c.Run(run) return _c } // UpdateRunnerScaleSet provides a mock function for the type MockActionsService func (_mock *MockActionsService) UpdateRunnerScaleSet(ctx context.Context, runnerScaleSetId int, runnerScaleSet *RunnerScaleSet) (*RunnerScaleSet, error) { ret := _mock.Called(ctx, runnerScaleSetId, runnerScaleSet) if len(ret) == 0 { panic("no return value specified for UpdateRunnerScaleSet") } var r0 *RunnerScaleSet var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, int, *RunnerScaleSet) (*RunnerScaleSet, error)); ok { return returnFunc(ctx, runnerScaleSetId, runnerScaleSet) } if returnFunc, ok := ret.Get(0).(func(context.Context, int, *RunnerScaleSet) *RunnerScaleSet); ok { r0 = returnFunc(ctx, runnerScaleSetId, runnerScaleSet) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*RunnerScaleSet) } } if returnFunc, ok := ret.Get(1).(func(context.Context, int, *RunnerScaleSet) error); ok { r1 = returnFunc(ctx, runnerScaleSetId, runnerScaleSet) } else { r1 = ret.Error(1) } return r0, r1 } // MockActionsService_UpdateRunnerScaleSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRunnerScaleSet' type MockActionsService_UpdateRunnerScaleSet_Call struct { *mock.Call } // UpdateRunnerScaleSet is a helper method to define mock.On call // - ctx context.Context // - runnerScaleSetId int // - runnerScaleSet *RunnerScaleSet func (_e *MockActionsService_Expecter) UpdateRunnerScaleSet(ctx interface{}, runnerScaleSetId interface{}, runnerScaleSet interface{}) *MockActionsService_UpdateRunnerScaleSet_Call { return &MockActionsService_UpdateRunnerScaleSet_Call{Call: _e.mock.On("UpdateRunnerScaleSet", ctx, runnerScaleSetId, runnerScaleSet)} } func (_c *MockActionsService_UpdateRunnerScaleSet_Call) Run(run func(ctx context.Context, runnerScaleSetId int, runnerScaleSet *RunnerScaleSet)) *MockActionsService_UpdateRunnerScaleSet_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 int if args[1] != nil { arg1 = args[1].(int) } var arg2 *RunnerScaleSet if args[2] != nil { arg2 = args[2].(*RunnerScaleSet) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockActionsService_UpdateRunnerScaleSet_Call) Return(runnerScaleSet1 *RunnerScaleSet, err error) *MockActionsService_UpdateRunnerScaleSet_Call { _c.Call.Return(runnerScaleSet1, err) return _c } func (_c *MockActionsService_UpdateRunnerScaleSet_Call) RunAndReturn(run func(ctx context.Context, runnerScaleSetId int, runnerScaleSet *RunnerScaleSet) (*RunnerScaleSet, error)) *MockActionsService_UpdateRunnerScaleSet_Call { _c.Call.Return(run) return _c } // NewMockSessionService creates a new instance of MockSessionService. 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 NewMockSessionService(t interface { mock.TestingT Cleanup(func()) }) *MockSessionService { mock := &MockSessionService{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockSessionService is an autogenerated mock type for the SessionService type type MockSessionService struct { mock.Mock } type MockSessionService_Expecter struct { mock *mock.Mock } func (_m *MockSessionService) EXPECT() *MockSessionService_Expecter { return &MockSessionService_Expecter{mock: &_m.Mock} } // AcquireJobs provides a mock function for the type MockSessionService func (_mock *MockSessionService) AcquireJobs(ctx context.Context, requestIds []int64) ([]int64, error) { ret := _mock.Called(ctx, requestIds) if len(ret) == 0 { panic("no return value specified for AcquireJobs") } var r0 []int64 var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, []int64) ([]int64, error)); ok { return returnFunc(ctx, requestIds) } if returnFunc, ok := ret.Get(0).(func(context.Context, []int64) []int64); ok { r0 = returnFunc(ctx, requestIds) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]int64) } } if returnFunc, ok := ret.Get(1).(func(context.Context, []int64) error); ok { r1 = returnFunc(ctx, requestIds) } else { r1 = ret.Error(1) } return r0, r1 } // MockSessionService_AcquireJobs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AcquireJobs' type MockSessionService_AcquireJobs_Call struct { *mock.Call } // AcquireJobs is a helper method to define mock.On call // - ctx context.Context // - requestIds []int64 func (_e *MockSessionService_Expecter) AcquireJobs(ctx interface{}, requestIds interface{}) *MockSessionService_AcquireJobs_Call { return &MockSessionService_AcquireJobs_Call{Call: _e.mock.On("AcquireJobs", ctx, requestIds)} } func (_c *MockSessionService_AcquireJobs_Call) Run(run func(ctx context.Context, requestIds []int64)) *MockSessionService_AcquireJobs_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 []int64 if args[1] != nil { arg1 = args[1].([]int64) } run( arg0, arg1, ) }) return _c } func (_c *MockSessionService_AcquireJobs_Call) Return(int64s []int64, err error) *MockSessionService_AcquireJobs_Call { _c.Call.Return(int64s, err) return _c } func (_c *MockSessionService_AcquireJobs_Call) RunAndReturn(run func(ctx context.Context, requestIds []int64) ([]int64, error)) *MockSessionService_AcquireJobs_Call { _c.Call.Return(run) return _c } // Close provides a mock function for the type MockSessionService func (_mock *MockSessionService) Close() error { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Close") } var r0 error if returnFunc, ok := ret.Get(0).(func() error); ok { r0 = returnFunc() } else { r0 = ret.Error(0) } return r0 } // MockSessionService_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' type MockSessionService_Close_Call struct { *mock.Call } // Close is a helper method to define mock.On call func (_e *MockSessionService_Expecter) Close() *MockSessionService_Close_Call { return &MockSessionService_Close_Call{Call: _e.mock.On("Close")} } func (_c *MockSessionService_Close_Call) Run(run func()) *MockSessionService_Close_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockSessionService_Close_Call) Return(err error) *MockSessionService_Close_Call { _c.Call.Return(err) return _c } func (_c *MockSessionService_Close_Call) RunAndReturn(run func() error) *MockSessionService_Close_Call { _c.Call.Return(run) return _c } // DeleteMessage provides a mock function for the type MockSessionService func (_mock *MockSessionService) DeleteMessage(ctx context.Context, messageId int64) error { ret := _mock.Called(ctx, messageId) if len(ret) == 0 { panic("no return value specified for DeleteMessage") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, int64) error); ok { r0 = returnFunc(ctx, messageId) } else { r0 = ret.Error(0) } return r0 } // MockSessionService_DeleteMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteMessage' type MockSessionService_DeleteMessage_Call struct { *mock.Call } // DeleteMessage is a helper method to define mock.On call // - ctx context.Context // - messageId int64 func (_e *MockSessionService_Expecter) DeleteMessage(ctx interface{}, messageId interface{}) *MockSessionService_DeleteMessage_Call { return &MockSessionService_DeleteMessage_Call{Call: _e.mock.On("DeleteMessage", ctx, messageId)} } func (_c *MockSessionService_DeleteMessage_Call) Run(run func(ctx context.Context, messageId int64)) *MockSessionService_DeleteMessage_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 int64 if args[1] != nil { arg1 = args[1].(int64) } run( arg0, arg1, ) }) return _c } func (_c *MockSessionService_DeleteMessage_Call) Return(err error) *MockSessionService_DeleteMessage_Call { _c.Call.Return(err) return _c } func (_c *MockSessionService_DeleteMessage_Call) RunAndReturn(run func(ctx context.Context, messageId int64) error) *MockSessionService_DeleteMessage_Call { _c.Call.Return(run) return _c } // GetMessage provides a mock function for the type MockSessionService func (_mock *MockSessionService) GetMessage(ctx context.Context, lastMessageId int64, maxCapacity int) (*RunnerScaleSetMessage, error) { ret := _mock.Called(ctx, lastMessageId, maxCapacity) if len(ret) == 0 { panic("no return value specified for GetMessage") } var r0 *RunnerScaleSetMessage var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, int64, int) (*RunnerScaleSetMessage, error)); ok { return returnFunc(ctx, lastMessageId, maxCapacity) } if returnFunc, ok := ret.Get(0).(func(context.Context, int64, int) *RunnerScaleSetMessage); ok { r0 = returnFunc(ctx, lastMessageId, maxCapacity) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*RunnerScaleSetMessage) } } if returnFunc, ok := ret.Get(1).(func(context.Context, int64, int) error); ok { r1 = returnFunc(ctx, lastMessageId, maxCapacity) } else { r1 = ret.Error(1) } return r0, r1 } // MockSessionService_GetMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMessage' type MockSessionService_GetMessage_Call struct { *mock.Call } // GetMessage is a helper method to define mock.On call // - ctx context.Context // - lastMessageId int64 // - maxCapacity int func (_e *MockSessionService_Expecter) GetMessage(ctx interface{}, lastMessageId interface{}, maxCapacity interface{}) *MockSessionService_GetMessage_Call { return &MockSessionService_GetMessage_Call{Call: _e.mock.On("GetMessage", ctx, lastMessageId, maxCapacity)} } func (_c *MockSessionService_GetMessage_Call) Run(run func(ctx context.Context, lastMessageId int64, maxCapacity int)) *MockSessionService_GetMessage_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 int64 if args[1] != nil { arg1 = args[1].(int64) } var arg2 int if args[2] != nil { arg2 = args[2].(int) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockSessionService_GetMessage_Call) Return(runnerScaleSetMessage *RunnerScaleSetMessage, err error) *MockSessionService_GetMessage_Call { _c.Call.Return(runnerScaleSetMessage, err) return _c } func (_c *MockSessionService_GetMessage_Call) RunAndReturn(run func(ctx context.Context, lastMessageId int64, maxCapacity int) (*RunnerScaleSetMessage, error)) *MockSessionService_GetMessage_Call { _c.Call.Return(run) return _c }