mirror of
https://github.com/goharbor/harbor.git
synced 2024-06-26 06:45:12 +02:00
148 lines
3.7 KiB
Go
148 lines
3.7 KiB
Go
|
// Code generated by mockery v2.0.3. DO NOT EDIT.
|
||
|
|
||
|
package task
|
||
|
|
||
|
import (
|
||
|
context "context"
|
||
|
|
||
|
q "github.com/goharbor/harbor/src/lib/q"
|
||
|
mock "github.com/stretchr/testify/mock"
|
||
|
|
||
|
task "github.com/goharbor/harbor/src/pkg/task"
|
||
|
)
|
||
|
|
||
|
// FakeExecutionManager is an autogenerated mock type for the ExecutionManager type
|
||
|
type FakeExecutionManager struct {
|
||
|
mock.Mock
|
||
|
}
|
||
|
|
||
|
// Create provides a mock function with given fields: ctx, vendorType, vendorID, trigger, extraAttrs
|
||
|
func (_m *FakeExecutionManager) Create(ctx context.Context, vendorType string, vendorID int64, trigger string, extraAttrs ...map[string]interface{}) (int64, error) {
|
||
|
_va := make([]interface{}, len(extraAttrs))
|
||
|
for _i := range extraAttrs {
|
||
|
_va[_i] = extraAttrs[_i]
|
||
|
}
|
||
|
var _ca []interface{}
|
||
|
_ca = append(_ca, ctx, vendorType, vendorID, trigger)
|
||
|
_ca = append(_ca, _va...)
|
||
|
ret := _m.Called(_ca...)
|
||
|
|
||
|
var r0 int64
|
||
|
if rf, ok := ret.Get(0).(func(context.Context, string, int64, string, ...map[string]interface{}) int64); ok {
|
||
|
r0 = rf(ctx, vendorType, vendorID, trigger, extraAttrs...)
|
||
|
} else {
|
||
|
r0 = ret.Get(0).(int64)
|
||
|
}
|
||
|
|
||
|
var r1 error
|
||
|
if rf, ok := ret.Get(1).(func(context.Context, string, int64, string, ...map[string]interface{}) error); ok {
|
||
|
r1 = rf(ctx, vendorType, vendorID, trigger, extraAttrs...)
|
||
|
} else {
|
||
|
r1 = ret.Error(1)
|
||
|
}
|
||
|
|
||
|
return r0, r1
|
||
|
}
|
||
|
|
||
|
// Delete provides a mock function with given fields: ctx, id
|
||
|
func (_m *FakeExecutionManager) Delete(ctx context.Context, id int64) error {
|
||
|
ret := _m.Called(ctx, id)
|
||
|
|
||
|
var r0 error
|
||
|
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||
|
r0 = rf(ctx, id)
|
||
|
} else {
|
||
|
r0 = ret.Error(0)
|
||
|
}
|
||
|
|
||
|
return r0
|
||
|
}
|
||
|
|
||
|
// Get provides a mock function with given fields: ctx, id
|
||
|
func (_m *FakeExecutionManager) Get(ctx context.Context, id int64) (*task.Execution, error) {
|
||
|
ret := _m.Called(ctx, id)
|
||
|
|
||
|
var r0 *task.Execution
|
||
|
if rf, ok := ret.Get(0).(func(context.Context, int64) *task.Execution); ok {
|
||
|
r0 = rf(ctx, id)
|
||
|
} else {
|
||
|
if ret.Get(0) != nil {
|
||
|
r0 = ret.Get(0).(*task.Execution)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
var r1 error
|
||
|
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
|
||
|
r1 = rf(ctx, id)
|
||
|
} else {
|
||
|
r1 = ret.Error(1)
|
||
|
}
|
||
|
|
||
|
return r0, r1
|
||
|
}
|
||
|
|
||
|
// List provides a mock function with given fields: ctx, query
|
||
|
func (_m *FakeExecutionManager) List(ctx context.Context, query *q.Query) ([]*task.Execution, error) {
|
||
|
ret := _m.Called(ctx, query)
|
||
|
|
||
|
var r0 []*task.Execution
|
||
|
if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*task.Execution); ok {
|
||
|
r0 = rf(ctx, query)
|
||
|
} else {
|
||
|
if ret.Get(0) != nil {
|
||
|
r0 = ret.Get(0).([]*task.Execution)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
var r1 error
|
||
|
if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok {
|
||
|
r1 = rf(ctx, query)
|
||
|
} else {
|
||
|
r1 = ret.Error(1)
|
||
|
}
|
||
|
|
||
|
return r0, r1
|
||
|
}
|
||
|
|
||
|
// MarkDone provides a mock function with given fields: ctx, id, message
|
||
|
func (_m *FakeExecutionManager) MarkDone(ctx context.Context, id int64, message string) error {
|
||
|
ret := _m.Called(ctx, id, message)
|
||
|
|
||
|
var r0 error
|
||
|
if rf, ok := ret.Get(0).(func(context.Context, int64, string) error); ok {
|
||
|
r0 = rf(ctx, id, message)
|
||
|
} else {
|
||
|
r0 = ret.Error(0)
|
||
|
}
|
||
|
|
||
|
return r0
|
||
|
}
|
||
|
|
||
|
// MarkError provides a mock function with given fields: ctx, id, message
|
||
|
func (_m *FakeExecutionManager) MarkError(ctx context.Context, id int64, message string) error {
|
||
|
ret := _m.Called(ctx, id, message)
|
||
|
|
||
|
var r0 error
|
||
|
if rf, ok := ret.Get(0).(func(context.Context, int64, string) error); ok {
|
||
|
r0 = rf(ctx, id, message)
|
||
|
} else {
|
||
|
r0 = ret.Error(0)
|
||
|
}
|
||
|
|
||
|
return r0
|
||
|
}
|
||
|
|
||
|
// Stop provides a mock function with given fields: ctx, id
|
||
|
func (_m *FakeExecutionManager) Stop(ctx context.Context, id int64) error {
|
||
|
ret := _m.Called(ctx, id)
|
||
|
|
||
|
var r0 error
|
||
|
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
|
||
|
r0 = rf(ctx, id)
|
||
|
} else {
|
||
|
r0 = ret.Error(0)
|
||
|
}
|
||
|
|
||
|
return r0
|
||
|
}
|