blob: 9f50b1884783ed28113a851e9c69b31a73c98dae [file] [log] [blame] [edit]
// Code generated by mockery v0.0.0-dev. DO NOT EDIT.
package mocks
import (
context "context"
mock "github.com/stretchr/testify/mock"
v1 "go.skia.org/infra/perf/go/anomalygroup/proto/v1"
)
// Store is an autogenerated mock type for the Store type
type Store struct {
mock.Mock
}
// AddAnomalyID provides a mock function with given fields: ctx, group_id, anomaly_id, anomaly_start_commit, anomaly_end_commit
func (_m *Store) AddAnomalyID(ctx context.Context, group_id string, anomaly_id string, anomaly_start_commit int64, anomaly_end_commit int64) error {
ret := _m.Called(ctx, group_id, anomaly_id, anomaly_start_commit, anomaly_end_commit)
if len(ret) == 0 {
panic("no return value specified for AddAnomalyID")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, int64, int64) error); ok {
r0 = rf(ctx, group_id, anomaly_id, anomaly_start_commit, anomaly_end_commit)
} else {
r0 = ret.Error(0)
}
return r0
}
// AddCulpritIDs provides a mock function with given fields: ctx, group_id, culprit_ids
func (_m *Store) AddCulpritIDs(ctx context.Context, group_id string, culprit_ids []string) error {
ret := _m.Called(ctx, group_id, culprit_ids)
if len(ret) == 0 {
panic("no return value specified for AddCulpritIDs")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, []string) error); ok {
r0 = rf(ctx, group_id, culprit_ids)
} else {
r0 = ret.Error(0)
}
return r0
}
// Create provides a mock function with given fields: ctx, subscription_name, subscription_revision, domain_name, benchmark_name, start_commit, end_commit, action
func (_m *Store) Create(ctx context.Context, subscription_name string, subscription_revision string, domain_name string, benchmark_name string, start_commit int64, end_commit int64, action string) (string, error) {
ret := _m.Called(ctx, subscription_name, subscription_revision, domain_name, benchmark_name, start_commit, end_commit, action)
if len(ret) == 0 {
panic("no return value specified for Create")
}
var r0 string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, int64, int64, string) (string, error)); ok {
return rf(ctx, subscription_name, subscription_revision, domain_name, benchmark_name, start_commit, end_commit, action)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, int64, int64, string) string); ok {
r0 = rf(ctx, subscription_name, subscription_revision, domain_name, benchmark_name, start_commit, end_commit, action)
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, int64, int64, string) error); ok {
r1 = rf(ctx, subscription_name, subscription_revision, domain_name, benchmark_name, start_commit, end_commit, action)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// FindExistingGroup provides a mock function with given fields: ctx, subscription_name, subscription_revision, domain_name, benchmark_name, start_commit, end_commit, action
func (_m *Store) FindExistingGroup(ctx context.Context, subscription_name string, subscription_revision string, domain_name string, benchmark_name string, start_commit int64, end_commit int64, action string) ([]*v1.AnomalyGroup, error) {
ret := _m.Called(ctx, subscription_name, subscription_revision, domain_name, benchmark_name, start_commit, end_commit, action)
if len(ret) == 0 {
panic("no return value specified for FindExistingGroup")
}
var r0 []*v1.AnomalyGroup
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, int64, int64, string) ([]*v1.AnomalyGroup, error)); ok {
return rf(ctx, subscription_name, subscription_revision, domain_name, benchmark_name, start_commit, end_commit, action)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, int64, int64, string) []*v1.AnomalyGroup); ok {
r0 = rf(ctx, subscription_name, subscription_revision, domain_name, benchmark_name, start_commit, end_commit, action)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*v1.AnomalyGroup)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, int64, int64, string) error); ok {
r1 = rf(ctx, subscription_name, subscription_revision, domain_name, benchmark_name, start_commit, end_commit, action)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetAnomalyIdsByAnomalyGroupId provides a mock function with given fields: ctx, anomalyGroupId
func (_m *Store) GetAnomalyIdsByAnomalyGroupId(ctx context.Context, anomalyGroupId string) ([]string, error) {
ret := _m.Called(ctx, anomalyGroupId)
if len(ret) == 0 {
panic("no return value specified for GetAnomalyIdsByAnomalyGroupId")
}
var r0 []string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok {
return rf(ctx, anomalyGroupId)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []string); ok {
r0 = rf(ctx, anomalyGroupId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, anomalyGroupId)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetAnomalyIdsByAnomalyGroupIds provides a mock function with given fields: ctx, anomalyGroupIds
func (_m *Store) GetAnomalyIdsByAnomalyGroupIds(ctx context.Context, anomalyGroupIds []string) ([]string, error) {
ret := _m.Called(ctx, anomalyGroupIds)
if len(ret) == 0 {
panic("no return value specified for GetAnomalyIdsByAnomalyGroupIds")
}
var r0 []string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, []string) ([]string, error)); ok {
return rf(ctx, anomalyGroupIds)
}
if rf, ok := ret.Get(0).(func(context.Context, []string) []string); ok {
r0 = rf(ctx, anomalyGroupIds)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok {
r1 = rf(ctx, anomalyGroupIds)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetAnomalyIdsByIssueId provides a mock function with given fields: ctx, issueId
func (_m *Store) GetAnomalyIdsByIssueId(ctx context.Context, issueId string) ([]string, error) {
ret := _m.Called(ctx, issueId)
if len(ret) == 0 {
panic("no return value specified for GetAnomalyIdsByIssueId")
}
var r0 []string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok {
return rf(ctx, issueId)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []string); ok {
r0 = rf(ctx, issueId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, issueId)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// LoadById provides a mock function with given fields: ctx, group_id
func (_m *Store) LoadById(ctx context.Context, group_id string) (*v1.AnomalyGroup, error) {
ret := _m.Called(ctx, group_id)
if len(ret) == 0 {
panic("no return value specified for LoadById")
}
var r0 *v1.AnomalyGroup
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*v1.AnomalyGroup, error)); ok {
return rf(ctx, group_id)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *v1.AnomalyGroup); ok {
r0 = rf(ctx, group_id)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1.AnomalyGroup)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, group_id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// UpdateBisectID provides a mock function with given fields: ctx, group_id, bisection_id
func (_m *Store) UpdateBisectID(ctx context.Context, group_id string, bisection_id string) error {
ret := _m.Called(ctx, group_id, bisection_id)
if len(ret) == 0 {
panic("no return value specified for UpdateBisectID")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
r0 = rf(ctx, group_id, bisection_id)
} else {
r0 = ret.Error(0)
}
return r0
}
// UpdateReportedIssueID provides a mock function with given fields: ctx, group_id, reported_issue_id
func (_m *Store) UpdateReportedIssueID(ctx context.Context, group_id string, reported_issue_id string) error {
ret := _m.Called(ctx, group_id, reported_issue_id)
if len(ret) == 0 {
panic("no return value specified for UpdateReportedIssueID")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
r0 = rf(ctx, group_id, reported_issue_id)
} 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
}