| // Code generated by mockery v0.0.0-dev. DO NOT EDIT. |
| |
| package mocks |
| |
| import ( |
| context "context" |
| |
| mock "github.com/stretchr/testify/mock" |
| status "go.skia.org/infra/autoroll/go/status" |
| ) |
| |
| // DB is an autogenerated mock type for the DB type |
| type DB struct { |
| mock.Mock |
| } |
| |
| // Close provides a mock function with given fields: |
| func (_m *DB) Close() error { |
| ret := _m.Called() |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Close") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func() error); ok { |
| r0 = rf() |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // Get provides a mock function with given fields: ctx, rollerName |
| func (_m *DB) Get(ctx context.Context, rollerName string) (*status.AutoRollStatus, error) { |
| ret := _m.Called(ctx, rollerName) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Get") |
| } |
| |
| var r0 *status.AutoRollStatus |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, string) (*status.AutoRollStatus, error)); ok { |
| return rf(ctx, rollerName) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, string) *status.AutoRollStatus); ok { |
| r0 = rf(ctx, rollerName) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*status.AutoRollStatus) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { |
| r1 = rf(ctx, rollerName) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // Set provides a mock function with given fields: ctx, rollerName, st |
| func (_m *DB) Set(ctx context.Context, rollerName string, st *status.AutoRollStatus) error { |
| ret := _m.Called(ctx, rollerName, st) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Set") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(context.Context, string, *status.AutoRollStatus) error); ok { |
| r0 = rf(ctx, rollerName, st) |
| } 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 |
| } |