| // Code generated by mockery v0.0.0-dev. DO NOT EDIT. |
| |
| package mocks |
| |
| import ( |
| context "context" |
| |
| mock "github.com/stretchr/testify/mock" |
| gitstore "go.skia.org/infra/go/gitstore" |
| |
| time "time" |
| |
| vcsinfo "go.skia.org/infra/go/vcsinfo" |
| ) |
| |
| // GitStore is an autogenerated mock type for the GitStore type |
| type GitStore struct { |
| mock.Mock |
| } |
| |
| // Get provides a mock function with given fields: ctx, hashes |
| func (_m *GitStore) Get(ctx context.Context, hashes []string) ([]*vcsinfo.LongCommit, error) { |
| ret := _m.Called(ctx, hashes) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Get") |
| } |
| |
| var r0 []*vcsinfo.LongCommit |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, []string) ([]*vcsinfo.LongCommit, error)); ok { |
| return rf(ctx, hashes) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, []string) []*vcsinfo.LongCommit); ok { |
| r0 = rf(ctx, hashes) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]*vcsinfo.LongCommit) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok { |
| r1 = rf(ctx, hashes) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // GetBranches provides a mock function with given fields: ctx |
| func (_m *GitStore) GetBranches(ctx context.Context) (map[string]*gitstore.BranchPointer, error) { |
| ret := _m.Called(ctx) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetBranches") |
| } |
| |
| var r0 map[string]*gitstore.BranchPointer |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context) (map[string]*gitstore.BranchPointer, error)); ok { |
| return rf(ctx) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context) map[string]*gitstore.BranchPointer); ok { |
| r0 = rf(ctx) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(map[string]*gitstore.BranchPointer) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context) error); ok { |
| r1 = rf(ctx) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // Put provides a mock function with given fields: ctx, commits |
| func (_m *GitStore) Put(ctx context.Context, commits []*vcsinfo.LongCommit) error { |
| ret := _m.Called(ctx, commits) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Put") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(context.Context, []*vcsinfo.LongCommit) error); ok { |
| r0 = rf(ctx, commits) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // PutBranches provides a mock function with given fields: ctx, branches |
| func (_m *GitStore) PutBranches(ctx context.Context, branches map[string]string) error { |
| ret := _m.Called(ctx, branches) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for PutBranches") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(context.Context, map[string]string) error); ok { |
| r0 = rf(ctx, branches) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // RangeByTime provides a mock function with given fields: ctx, start, end, branch |
| func (_m *GitStore) RangeByTime(ctx context.Context, start time.Time, end time.Time, branch string) ([]*vcsinfo.IndexCommit, error) { |
| ret := _m.Called(ctx, start, end, branch) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for RangeByTime") |
| } |
| |
| var r0 []*vcsinfo.IndexCommit |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, time.Time, time.Time, string) ([]*vcsinfo.IndexCommit, error)); ok { |
| return rf(ctx, start, end, branch) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, time.Time, time.Time, string) []*vcsinfo.IndexCommit); ok { |
| r0 = rf(ctx, start, end, branch) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]*vcsinfo.IndexCommit) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, time.Time, time.Time, string) error); ok { |
| r1 = rf(ctx, start, end, branch) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // RangeN provides a mock function with given fields: ctx, startIndex, endIndex, branch |
| func (_m *GitStore) RangeN(ctx context.Context, startIndex int, endIndex int, branch string) ([]*vcsinfo.IndexCommit, error) { |
| ret := _m.Called(ctx, startIndex, endIndex, branch) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for RangeN") |
| } |
| |
| var r0 []*vcsinfo.IndexCommit |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, int, int, string) ([]*vcsinfo.IndexCommit, error)); ok { |
| return rf(ctx, startIndex, endIndex, branch) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, int, int, string) []*vcsinfo.IndexCommit); ok { |
| r0 = rf(ctx, startIndex, endIndex, branch) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]*vcsinfo.IndexCommit) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, int, int, string) error); ok { |
| r1 = rf(ctx, startIndex, endIndex, branch) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // NewGitStore creates a new instance of GitStore. 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 NewGitStore(t interface { |
| mock.TestingT |
| Cleanup(func()) |
| }) *GitStore { |
| mock := &GitStore{} |
| mock.Mock.Test(t) |
| |
| t.Cleanup(func() { mock.AssertExpectations(t) }) |
| |
| return mock |
| } |