| // Code generated by mockery v0.0.0-dev. DO NOT EDIT. |
| |
| package mocks |
| |
| import ( |
| context "context" |
| |
| mock "github.com/stretchr/testify/mock" |
| louhi "go.skia.org/infra/go/louhi" |
| ) |
| |
| // DB is an autogenerated mock type for the DB type |
| type DB struct { |
| mock.Mock |
| } |
| |
| // GetFlowExecution provides a mock function with given fields: ctx, id |
| func (_m *DB) GetFlowExecution(ctx context.Context, id string) (*louhi.FlowExecution, error) { |
| ret := _m.Called(ctx, id) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetFlowExecution") |
| } |
| |
| var r0 *louhi.FlowExecution |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, string) (*louhi.FlowExecution, error)); ok { |
| return rf(ctx, id) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, string) *louhi.FlowExecution); ok { |
| r0 = rf(ctx, id) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*louhi.FlowExecution) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { |
| r1 = rf(ctx, id) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // GetLatestFlowExecutions provides a mock function with given fields: ctx |
| func (_m *DB) GetLatestFlowExecutions(ctx context.Context) (map[string]*louhi.FlowExecution, error) { |
| ret := _m.Called(ctx) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetLatestFlowExecutions") |
| } |
| |
| var r0 map[string]*louhi.FlowExecution |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context) (map[string]*louhi.FlowExecution, error)); ok { |
| return rf(ctx) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context) map[string]*louhi.FlowExecution); ok { |
| r0 = rf(ctx) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(map[string]*louhi.FlowExecution) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context) error); ok { |
| r1 = rf(ctx) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // PutFlowExecution provides a mock function with given fields: ctx, fe |
| func (_m *DB) PutFlowExecution(ctx context.Context, fe *louhi.FlowExecution) error { |
| ret := _m.Called(ctx, fe) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for PutFlowExecution") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(context.Context, *louhi.FlowExecution) error); ok { |
| r0 = rf(ctx, fe) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // NewDB creates a new instance of DB. 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 NewDB(t interface { |
| mock.TestingT |
| Cleanup(func()) |
| }) *DB { |
| mock := &DB{} |
| mock.Mock.Test(t) |
| |
| t.Cleanup(func() { mock.AssertExpectations(t) }) |
| |
| return mock |
| } |