172 lines
6.4 KiB
Go
172 lines
6.4 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: git.blender.org/flamenco/internal/manager/timeout_checker (interfaces: PersistenceService,TaskStateMachine,LogStorage)
|
|
|
|
// Package mocks is a generated GoMock package.
|
|
package mocks
|
|
|
|
import (
|
|
context "context"
|
|
reflect "reflect"
|
|
time "time"
|
|
|
|
persistence "git.blender.org/flamenco/internal/manager/persistence"
|
|
api "git.blender.org/flamenco/pkg/api"
|
|
gomock "github.com/golang/mock/gomock"
|
|
zerolog "github.com/rs/zerolog"
|
|
)
|
|
|
|
// MockPersistenceService is a mock of PersistenceService interface.
|
|
type MockPersistenceService struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockPersistenceServiceMockRecorder
|
|
}
|
|
|
|
// MockPersistenceServiceMockRecorder is the mock recorder for MockPersistenceService.
|
|
type MockPersistenceServiceMockRecorder struct {
|
|
mock *MockPersistenceService
|
|
}
|
|
|
|
// NewMockPersistenceService creates a new mock instance.
|
|
func NewMockPersistenceService(ctrl *gomock.Controller) *MockPersistenceService {
|
|
mock := &MockPersistenceService{ctrl: ctrl}
|
|
mock.recorder = &MockPersistenceServiceMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockPersistenceService) EXPECT() *MockPersistenceServiceMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// FetchTimedOutTasks mocks base method.
|
|
func (m *MockPersistenceService) FetchTimedOutTasks(arg0 context.Context, arg1 time.Time) ([]*persistence.Task, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "FetchTimedOutTasks", arg0, arg1)
|
|
ret0, _ := ret[0].([]*persistence.Task)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// FetchTimedOutTasks indicates an expected call of FetchTimedOutTasks.
|
|
func (mr *MockPersistenceServiceMockRecorder) FetchTimedOutTasks(arg0, arg1 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FetchTimedOutTasks", reflect.TypeOf((*MockPersistenceService)(nil).FetchTimedOutTasks), arg0, arg1)
|
|
}
|
|
|
|
// FetchTimedOutWorkers mocks base method.
|
|
func (m *MockPersistenceService) FetchTimedOutWorkers(arg0 context.Context, arg1 time.Time) ([]*persistence.Worker, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "FetchTimedOutWorkers", arg0, arg1)
|
|
ret0, _ := ret[0].([]*persistence.Worker)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// FetchTimedOutWorkers indicates an expected call of FetchTimedOutWorkers.
|
|
func (mr *MockPersistenceServiceMockRecorder) FetchTimedOutWorkers(arg0, arg1 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FetchTimedOutWorkers", reflect.TypeOf((*MockPersistenceService)(nil).FetchTimedOutWorkers), arg0, arg1)
|
|
}
|
|
|
|
// SaveWorker mocks base method.
|
|
func (m *MockPersistenceService) SaveWorker(arg0 context.Context, arg1 *persistence.Worker) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "SaveWorker", arg0, arg1)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// SaveWorker indicates an expected call of SaveWorker.
|
|
func (mr *MockPersistenceServiceMockRecorder) SaveWorker(arg0, arg1 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveWorker", reflect.TypeOf((*MockPersistenceService)(nil).SaveWorker), arg0, arg1)
|
|
}
|
|
|
|
// MockTaskStateMachine is a mock of TaskStateMachine interface.
|
|
type MockTaskStateMachine struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockTaskStateMachineMockRecorder
|
|
}
|
|
|
|
// MockTaskStateMachineMockRecorder is the mock recorder for MockTaskStateMachine.
|
|
type MockTaskStateMachineMockRecorder struct {
|
|
mock *MockTaskStateMachine
|
|
}
|
|
|
|
// NewMockTaskStateMachine creates a new mock instance.
|
|
func NewMockTaskStateMachine(ctrl *gomock.Controller) *MockTaskStateMachine {
|
|
mock := &MockTaskStateMachine{ctrl: ctrl}
|
|
mock.recorder = &MockTaskStateMachineMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockTaskStateMachine) EXPECT() *MockTaskStateMachineMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// RequeueTasksOfWorker mocks base method.
|
|
func (m *MockTaskStateMachine) RequeueTasksOfWorker(arg0 context.Context, arg1 *persistence.Worker, arg2 string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "RequeueTasksOfWorker", arg0, arg1, arg2)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// RequeueTasksOfWorker indicates an expected call of RequeueTasksOfWorker.
|
|
func (mr *MockTaskStateMachineMockRecorder) RequeueTasksOfWorker(arg0, arg1, arg2 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequeueTasksOfWorker", reflect.TypeOf((*MockTaskStateMachine)(nil).RequeueTasksOfWorker), arg0, arg1, arg2)
|
|
}
|
|
|
|
// TaskStatusChange mocks base method.
|
|
func (m *MockTaskStateMachine) TaskStatusChange(arg0 context.Context, arg1 *persistence.Task, arg2 api.TaskStatus) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "TaskStatusChange", arg0, arg1, arg2)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// TaskStatusChange indicates an expected call of TaskStatusChange.
|
|
func (mr *MockTaskStateMachineMockRecorder) TaskStatusChange(arg0, arg1, arg2 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TaskStatusChange", reflect.TypeOf((*MockTaskStateMachine)(nil).TaskStatusChange), arg0, arg1, arg2)
|
|
}
|
|
|
|
// MockLogStorage is a mock of LogStorage interface.
|
|
type MockLogStorage struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockLogStorageMockRecorder
|
|
}
|
|
|
|
// MockLogStorageMockRecorder is the mock recorder for MockLogStorage.
|
|
type MockLogStorageMockRecorder struct {
|
|
mock *MockLogStorage
|
|
}
|
|
|
|
// NewMockLogStorage creates a new mock instance.
|
|
func NewMockLogStorage(ctrl *gomock.Controller) *MockLogStorage {
|
|
mock := &MockLogStorage{ctrl: ctrl}
|
|
mock.recorder = &MockLogStorageMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockLogStorage) EXPECT() *MockLogStorageMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// WriteTimestamped mocks base method.
|
|
func (m *MockLogStorage) WriteTimestamped(arg0 zerolog.Logger, arg1, arg2, arg3 string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "WriteTimestamped", arg0, arg1, arg2, arg3)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// WriteTimestamped indicates an expected call of WriteTimestamped.
|
|
func (mr *MockLogStorageMockRecorder) WriteTimestamped(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteTimestamped", reflect.TypeOf((*MockLogStorage)(nil).WriteTimestamped), arg0, arg1, arg2, arg3)
|
|
}
|