mirror of https://github.com/goharbor/harbor.git
104 lines
2.1 KiB
Go
104 lines
2.1 KiB
Go
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
|
|
|
package adapter
|
|
|
|
import (
|
|
model "github.com/goharbor/harbor/src/pkg/reg/model"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// Adapter is an autogenerated mock type for the Adapter type
|
|
type Adapter struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// HealthCheck provides a mock function with given fields:
|
|
func (_m *Adapter) HealthCheck() (string, error) {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for HealthCheck")
|
|
}
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func() (string, error)); ok {
|
|
return rf()
|
|
}
|
|
if rf, ok := ret.Get(0).(func() string); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func() error); ok {
|
|
r1 = rf()
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Info provides a mock function with given fields:
|
|
func (_m *Adapter) Info() (*model.RegistryInfo, error) {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Info")
|
|
}
|
|
|
|
var r0 *model.RegistryInfo
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func() (*model.RegistryInfo, error)); ok {
|
|
return rf()
|
|
}
|
|
if rf, ok := ret.Get(0).(func() *model.RegistryInfo); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.RegistryInfo)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func() error); ok {
|
|
r1 = rf()
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// PrepareForPush provides a mock function with given fields: _a0
|
|
func (_m *Adapter) PrepareForPush(_a0 []*model.Resource) error {
|
|
ret := _m.Called(_a0)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for PrepareForPush")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func([]*model.Resource) error); ok {
|
|
r0 = rf(_a0)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// NewAdapter creates a new instance of Adapter. 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 NewAdapter(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *Adapter {
|
|
mock := &Adapter{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|