blob: bb3158916cf9c2bedadfd202e9aa1ae73386cb3d [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"
status "go.skia.org/infra/autoroll/go/status"
testing "testing"
)
// DB is an autogenerated mock type for the DB type
type DB struct {
mock.Mock
}
// 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)
var r0 *status.AutoRollStatus
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)
}
}
var r1 error
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)
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 cleanup function to assert the mocks expectations.
func NewDB(t testing.TB) *DB {
mock := &DB{}
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}