blob: 403006ee260823e5ddf76208a23bc7ab97ffd289 [file] [log] [blame]
// 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"
testing "testing"
)
// 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)
var r0 *louhi.FlowExecution
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)
}
}
var r1 error
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)
var r0 map[string]*louhi.FlowExecution
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)
}
}
var r1 error
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)
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 cleanup function to assert the mocks expectations.
func NewDB(t testing.TB) *DB {
mock := &DB{}
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}