| // Code generated by mockery v0.0.0-dev. DO NOT EDIT. |
| |
| package mocks |
| |
| import ( |
| context "context" |
| |
| clustering2 "go.skia.org/infra/perf/go/clustering2" |
| |
| frame "go.skia.org/infra/perf/go/ui/frame" |
| |
| mock "github.com/stretchr/testify/mock" |
| |
| pgx "github.com/jackc/pgx/v4" |
| |
| regression "go.skia.org/infra/perf/go/regression" |
| |
| types "go.skia.org/infra/perf/go/types" |
| |
| v1 "go.skia.org/infra/perf/go/subscription/proto/v1" |
| ) |
| |
| // Store is an autogenerated mock type for the Store type |
| type Store struct { |
| mock.Mock |
| } |
| |
| // DeleteByCommit provides a mock function with given fields: ctx, commitNumber, tx |
| func (_m *Store) DeleteByCommit(ctx context.Context, commitNumber types.CommitNumber, tx pgx.Tx) error { |
| ret := _m.Called(ctx, commitNumber, tx) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for DeleteByCommit") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(context.Context, types.CommitNumber, pgx.Tx) error); ok { |
| r0 = rf(ctx, commitNumber, tx) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // GetBatchRegressionsBefore provides a mock function with given fields: ctx, traceNames, commitNumbers, subName |
| func (_m *Store) GetBatchRegressionsBefore(ctx context.Context, traceNames []string, commitNumbers []types.CommitNumber, subName string) (map[string]map[types.CommitNumber]*regression.Regression, error) { |
| ret := _m.Called(ctx, traceNames, commitNumbers, subName) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetBatchRegressionsBefore") |
| } |
| |
| var r0 map[string]map[types.CommitNumber]*regression.Regression |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, []string, []types.CommitNumber, string) (map[string]map[types.CommitNumber]*regression.Regression, error)); ok { |
| return rf(ctx, traceNames, commitNumbers, subName) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, []string, []types.CommitNumber, string) map[string]map[types.CommitNumber]*regression.Regression); ok { |
| r0 = rf(ctx, traceNames, commitNumbers, subName) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(map[string]map[types.CommitNumber]*regression.Regression) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, []string, []types.CommitNumber, string) error); ok { |
| r1 = rf(ctx, traceNames, commitNumbers, subName) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // GetBugIdsForRegressions provides a mock function with given fields: ctx, regressions |
| func (_m *Store) GetBugIdsForRegressions(ctx context.Context, regressions []*regression.Regression) ([]*regression.Regression, error) { |
| ret := _m.Called(ctx, regressions) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetBugIdsForRegressions") |
| } |
| |
| var r0 []*regression.Regression |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, []*regression.Regression) ([]*regression.Regression, error)); ok { |
| return rf(ctx, regressions) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, []*regression.Regression) []*regression.Regression); ok { |
| r0 = rf(ctx, regressions) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]*regression.Regression) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, []*regression.Regression) error); ok { |
| r1 = rf(ctx, regressions) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // GetByIDs provides a mock function with given fields: ctx, ids |
| func (_m *Store) GetByIDs(ctx context.Context, ids []string) ([]*regression.Regression, error) { |
| ret := _m.Called(ctx, ids) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetByIDs") |
| } |
| |
| var r0 []*regression.Regression |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, []string) ([]*regression.Regression, error)); ok { |
| return rf(ctx, ids) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, []string) []*regression.Regression); ok { |
| r0 = rf(ctx, ids) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]*regression.Regression) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok { |
| r1 = rf(ctx, ids) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // GetByLegacyKeys provides a mock function with given fields: ctx, legacyKeys |
| func (_m *Store) GetByLegacyKeys(ctx context.Context, legacyKeys []string) ([]*regression.Regression, error) { |
| ret := _m.Called(ctx, legacyKeys) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetByLegacyKeys") |
| } |
| |
| var r0 []*regression.Regression |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, []string) ([]*regression.Regression, error)); ok { |
| return rf(ctx, legacyKeys) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, []string) []*regression.Regression); ok { |
| r0 = rf(ctx, legacyKeys) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]*regression.Regression) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok { |
| r1 = rf(ctx, legacyKeys) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // GetByRevision provides a mock function with given fields: ctx, rev |
| func (_m *Store) GetByRevision(ctx context.Context, rev string) ([]*regression.Regression, error) { |
| ret := _m.Called(ctx, rev) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetByRevision") |
| } |
| |
| var r0 []*regression.Regression |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, string) ([]*regression.Regression, error)); ok { |
| return rf(ctx, rev) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, string) []*regression.Regression); ok { |
| r0 = rf(ctx, rev) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]*regression.Regression) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { |
| r1 = rf(ctx, rev) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // GetIdsByManualTriageBugID provides a mock function with given fields: ctx, bugID |
| func (_m *Store) GetIdsByManualTriageBugID(ctx context.Context, bugID int) ([]string, error) { |
| ret := _m.Called(ctx, bugID) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetIdsByManualTriageBugID") |
| } |
| |
| var r0 []string |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, int) ([]string, error)); ok { |
| return rf(ctx, bugID) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, int) []string); ok { |
| r0 = rf(ctx, bugID) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]string) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, int) error); ok { |
| r1 = rf(ctx, bugID) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // GetOldestCommit provides a mock function with given fields: ctx |
| func (_m *Store) GetOldestCommit(ctx context.Context) (*types.CommitNumber, error) { |
| ret := _m.Called(ctx) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetOldestCommit") |
| } |
| |
| var r0 *types.CommitNumber |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context) (*types.CommitNumber, error)); ok { |
| return rf(ctx) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context) *types.CommitNumber); ok { |
| r0 = rf(ctx) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*types.CommitNumber) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context) error); ok { |
| r1 = rf(ctx) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // GetRegression provides a mock function with given fields: ctx, commitNumber, alertID |
| func (_m *Store) GetRegression(ctx context.Context, commitNumber types.CommitNumber, alertID string) (*regression.Regression, error) { |
| ret := _m.Called(ctx, commitNumber, alertID) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetRegression") |
| } |
| |
| var r0 *regression.Regression |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, types.CommitNumber, string) (*regression.Regression, error)); ok { |
| return rf(ctx, commitNumber, alertID) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, types.CommitNumber, string) *regression.Regression); ok { |
| r0 = rf(ctx, commitNumber, alertID) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*regression.Regression) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, types.CommitNumber, string) error); ok { |
| r1 = rf(ctx, commitNumber, alertID) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // GetRegressionsBefore provides a mock function with given fields: ctx, traceName, subName, commit, limit |
| func (_m *Store) GetRegressionsBefore(ctx context.Context, traceName string, subName string, commit types.CommitNumber, limit int) ([]*regression.Regression, error) { |
| ret := _m.Called(ctx, traceName, subName, commit, limit) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetRegressionsBefore") |
| } |
| |
| var r0 []*regression.Regression |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, string, string, types.CommitNumber, int) ([]*regression.Regression, error)); ok { |
| return rf(ctx, traceName, subName, commit, limit) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, string, string, types.CommitNumber, int) []*regression.Regression); ok { |
| r0 = rf(ctx, traceName, subName, commit, limit) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]*regression.Regression) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, string, string, types.CommitNumber, int) error); ok { |
| r1 = rf(ctx, traceName, subName, commit, limit) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // GetRegressionsBySubName provides a mock function with given fields: ctx, req, limit |
| func (_m *Store) GetRegressionsBySubName(ctx context.Context, req regression.GetAnomalyListRequest, limit int) ([]*regression.Regression, error) { |
| ret := _m.Called(ctx, req, limit) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetRegressionsBySubName") |
| } |
| |
| var r0 []*regression.Regression |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, regression.GetAnomalyListRequest, int) ([]*regression.Regression, error)); ok { |
| return rf(ctx, req, limit) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, regression.GetAnomalyListRequest, int) []*regression.Regression); ok { |
| r0 = rf(ctx, req, limit) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]*regression.Regression) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, regression.GetAnomalyListRequest, int) error); ok { |
| r1 = rf(ctx, req, limit) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // GetSubscriptionsForRegressions provides a mock function with given fields: ctx, regressionIDs |
| func (_m *Store) GetSubscriptionsForRegressions(ctx context.Context, regressionIDs []string) ([]string, []*v1.Subscription, error) { |
| ret := _m.Called(ctx, regressionIDs) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for GetSubscriptionsForRegressions") |
| } |
| |
| var r0 []string |
| var r1 []*v1.Subscription |
| var r2 error |
| if rf, ok := ret.Get(0).(func(context.Context, []string) ([]string, []*v1.Subscription, error)); ok { |
| return rf(ctx, regressionIDs) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, []string) []string); ok { |
| r0 = rf(ctx, regressionIDs) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]string) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, []string) []*v1.Subscription); ok { |
| r1 = rf(ctx, regressionIDs) |
| } else { |
| if ret.Get(1) != nil { |
| r1 = ret.Get(1).([]*v1.Subscription) |
| } |
| } |
| |
| if rf, ok := ret.Get(2).(func(context.Context, []string) error); ok { |
| r2 = rf(ctx, regressionIDs) |
| } else { |
| r2 = ret.Error(2) |
| } |
| |
| return r0, r1, r2 |
| } |
| |
| // IgnoreAnomalies provides a mock function with given fields: ctx, regressionIDs |
| func (_m *Store) IgnoreAnomalies(ctx context.Context, regressionIDs []string) error { |
| ret := _m.Called(ctx, regressionIDs) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for IgnoreAnomalies") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(context.Context, []string) error); ok { |
| r0 = rf(ctx, regressionIDs) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // NudgeAndResetAnomalies provides a mock function with given fields: ctx, regressionIDs, displayCommitNumber |
| func (_m *Store) NudgeAndResetAnomalies(ctx context.Context, regressionIDs []string, displayCommitNumber types.CommitNumber) error { |
| ret := _m.Called(ctx, regressionIDs, displayCommitNumber) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for NudgeAndResetAnomalies") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(context.Context, []string, types.CommitNumber) error); ok { |
| r0 = rf(ctx, regressionIDs, displayCommitNumber) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // Range provides a mock function with given fields: ctx, begin, end |
| func (_m *Store) Range(ctx context.Context, begin types.CommitNumber, end types.CommitNumber) (map[types.CommitNumber]*regression.AllRegressionsForCommit, error) { |
| ret := _m.Called(ctx, begin, end) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Range") |
| } |
| |
| var r0 map[types.CommitNumber]*regression.AllRegressionsForCommit |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, types.CommitNumber, types.CommitNumber) (map[types.CommitNumber]*regression.AllRegressionsForCommit, error)); ok { |
| return rf(ctx, begin, end) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, types.CommitNumber, types.CommitNumber) map[types.CommitNumber]*regression.AllRegressionsForCommit); ok { |
| r0 = rf(ctx, begin, end) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(map[types.CommitNumber]*regression.AllRegressionsForCommit) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, types.CommitNumber, types.CommitNumber) error); ok { |
| r1 = rf(ctx, begin, end) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // RangeFiltered provides a mock function with given fields: ctx, begin, end, traceNames |
| func (_m *Store) RangeFiltered(ctx context.Context, begin types.CommitNumber, end types.CommitNumber, traceNames []string) ([]*regression.Regression, error) { |
| ret := _m.Called(ctx, begin, end, traceNames) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for RangeFiltered") |
| } |
| |
| var r0 []*regression.Regression |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, types.CommitNumber, types.CommitNumber, []string) ([]*regression.Regression, error)); ok { |
| return rf(ctx, begin, end, traceNames) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, types.CommitNumber, types.CommitNumber, []string) []*regression.Regression); ok { |
| r0 = rf(ctx, begin, end, traceNames) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]*regression.Regression) |
| } |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, types.CommitNumber, types.CommitNumber, []string) error); ok { |
| r1 = rf(ctx, begin, end, traceNames) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // ResetAnomalies provides a mock function with given fields: ctx, regressionIDs |
| func (_m *Store) ResetAnomalies(ctx context.Context, regressionIDs []string) error { |
| ret := _m.Called(ctx, regressionIDs) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for ResetAnomalies") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(context.Context, []string) error); ok { |
| r0 = rf(ctx, regressionIDs) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // SetBugID provides a mock function with given fields: ctx, regressionIDs, bugID |
| func (_m *Store) SetBugID(ctx context.Context, regressionIDs []string, bugID int) error { |
| ret := _m.Called(ctx, regressionIDs, bugID) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for SetBugID") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(context.Context, []string, int) error); ok { |
| r0 = rf(ctx, regressionIDs, bugID) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // SetHigh provides a mock function with given fields: ctx, commitRange, alertID, df, high |
| func (_m *Store) SetHigh(ctx context.Context, commitRange regression.AnomalyCommitRange, alertID string, df *frame.FrameResponse, high *clustering2.ClusterSummary) (bool, string, error) { |
| ret := _m.Called(ctx, commitRange, alertID, df, high) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for SetHigh") |
| } |
| |
| var r0 bool |
| var r1 string |
| var r2 error |
| if rf, ok := ret.Get(0).(func(context.Context, regression.AnomalyCommitRange, string, *frame.FrameResponse, *clustering2.ClusterSummary) (bool, string, error)); ok { |
| return rf(ctx, commitRange, alertID, df, high) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, regression.AnomalyCommitRange, string, *frame.FrameResponse, *clustering2.ClusterSummary) bool); ok { |
| r0 = rf(ctx, commitRange, alertID, df, high) |
| } else { |
| r0 = ret.Get(0).(bool) |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, regression.AnomalyCommitRange, string, *frame.FrameResponse, *clustering2.ClusterSummary) string); ok { |
| r1 = rf(ctx, commitRange, alertID, df, high) |
| } else { |
| r1 = ret.Get(1).(string) |
| } |
| |
| if rf, ok := ret.Get(2).(func(context.Context, regression.AnomalyCommitRange, string, *frame.FrameResponse, *clustering2.ClusterSummary) error); ok { |
| r2 = rf(ctx, commitRange, alertID, df, high) |
| } else { |
| r2 = ret.Error(2) |
| } |
| |
| return r0, r1, r2 |
| } |
| |
| // SetLow provides a mock function with given fields: ctx, commitRange, alertID, df, low |
| func (_m *Store) SetLow(ctx context.Context, commitRange regression.AnomalyCommitRange, alertID string, df *frame.FrameResponse, low *clustering2.ClusterSummary) (bool, string, error) { |
| ret := _m.Called(ctx, commitRange, alertID, df, low) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for SetLow") |
| } |
| |
| var r0 bool |
| var r1 string |
| var r2 error |
| if rf, ok := ret.Get(0).(func(context.Context, regression.AnomalyCommitRange, string, *frame.FrameResponse, *clustering2.ClusterSummary) (bool, string, error)); ok { |
| return rf(ctx, commitRange, alertID, df, low) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, regression.AnomalyCommitRange, string, *frame.FrameResponse, *clustering2.ClusterSummary) bool); ok { |
| r0 = rf(ctx, commitRange, alertID, df, low) |
| } else { |
| r0 = ret.Get(0).(bool) |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, regression.AnomalyCommitRange, string, *frame.FrameResponse, *clustering2.ClusterSummary) string); ok { |
| r1 = rf(ctx, commitRange, alertID, df, low) |
| } else { |
| r1 = ret.Get(1).(string) |
| } |
| |
| if rf, ok := ret.Get(2).(func(context.Context, regression.AnomalyCommitRange, string, *frame.FrameResponse, *clustering2.ClusterSummary) error); ok { |
| r2 = rf(ctx, commitRange, alertID, df, low) |
| } else { |
| r2 = ret.Error(2) |
| } |
| |
| return r0, r1, r2 |
| } |
| |
| // TriageHigh provides a mock function with given fields: ctx, commitNumber, alertID, tr |
| func (_m *Store) TriageHigh(ctx context.Context, commitNumber types.CommitNumber, alertID string, tr regression.TriageStatus) error { |
| ret := _m.Called(ctx, commitNumber, alertID, tr) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for TriageHigh") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(context.Context, types.CommitNumber, string, regression.TriageStatus) error); ok { |
| r0 = rf(ctx, commitNumber, alertID, tr) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // TriageLow provides a mock function with given fields: ctx, commitNumber, alertID, tr |
| func (_m *Store) TriageLow(ctx context.Context, commitNumber types.CommitNumber, alertID string, tr regression.TriageStatus) error { |
| ret := _m.Called(ctx, commitNumber, alertID, tr) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for TriageLow") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(context.Context, types.CommitNumber, string, regression.TriageStatus) error); ok { |
| r0 = rf(ctx, commitNumber, alertID, tr) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // Write provides a mock function with given fields: ctx, regressions |
| func (_m *Store) Write(ctx context.Context, regressions map[types.CommitNumber]*regression.AllRegressionsForCommit) error { |
| ret := _m.Called(ctx, regressions) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Write") |
| } |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(context.Context, map[types.CommitNumber]*regression.AllRegressionsForCommit) error); ok { |
| r0 = rf(ctx, regressions) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // NewStore creates a new instance of Store. 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 NewStore(t interface { |
| mock.TestingT |
| Cleanup(func()) |
| }) *Store { |
| mock := &Store{} |
| mock.Mock.Test(t) |
| |
| t.Cleanup(func() { mock.AssertExpectations(t) }) |
| |
| return mock |
| } |