mock/openshift/mock_route.go (165 lines of code) (raw):
// Code generated by mockery v2.9.4. DO NOT EDIT.
package mock
import (
context "context"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
mock "github.com/stretchr/testify/mock"
types "k8s.io/apimachinery/pkg/types"
v1 "github.com/openshift/api/route/v1"
watch "k8s.io/apimachinery/pkg/watch"
)
// Route is an autogenerated mock type for the Route type
type Route struct {
mock.Mock
}
// Create provides a mock function with given fields: ctx, route, opts
func (_m *Route) Create(ctx context.Context, route *v1.Route, opts metav1.CreateOptions) (*v1.Route, error) {
ret := _m.Called(ctx, route, opts)
var r0 *v1.Route
if rf, ok := ret.Get(0).(func(context.Context, *v1.Route, metav1.CreateOptions) *v1.Route); ok {
r0 = rf(ctx, route, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1.Route)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *v1.Route, metav1.CreateOptions) error); ok {
r1 = rf(ctx, route, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Delete provides a mock function with given fields: ctx, name, opts
func (_m *Route) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
ret := _m.Called(ctx, name, opts)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, metav1.DeleteOptions) error); ok {
r0 = rf(ctx, name, opts)
} else {
r0 = ret.Error(0)
}
return r0
}
// DeleteCollection provides a mock function with given fields: ctx, opts, listOpts
func (_m *Route) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
ret := _m.Called(ctx, opts, listOpts)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, metav1.DeleteOptions, metav1.ListOptions) error); ok {
r0 = rf(ctx, opts, listOpts)
} else {
r0 = ret.Error(0)
}
return r0
}
// Get provides a mock function with given fields: ctx, name, opts
func (_m *Route) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Route, error) {
ret := _m.Called(ctx, name, opts)
var r0 *v1.Route
if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) *v1.Route); ok {
r0 = rf(ctx, name, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1.Route)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, metav1.GetOptions) error); ok {
r1 = rf(ctx, name, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// List provides a mock function with given fields: ctx, opts
func (_m *Route) List(ctx context.Context, opts metav1.ListOptions) (*v1.RouteList, error) {
ret := _m.Called(ctx, opts)
var r0 *v1.RouteList
if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) *v1.RouteList); ok {
r0 = rf(ctx, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1.RouteList)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, metav1.ListOptions) error); ok {
r1 = rf(ctx, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Patch provides a mock function with given fields: ctx, name, pt, data, opts, subresources
func (_m *Route) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*v1.Route, error) {
_va := make([]interface{}, len(subresources))
for _i := range subresources {
_va[_i] = subresources[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, name, pt, data, opts)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
var r0 *v1.Route
if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) *v1.Route); ok {
r0 = rf(ctx, name, pt, data, opts, subresources...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1.Route)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) error); ok {
r1 = rf(ctx, name, pt, data, opts, subresources...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Update provides a mock function with given fields: ctx, route, opts
func (_m *Route) Update(ctx context.Context, route *v1.Route, opts metav1.UpdateOptions) (*v1.Route, error) {
ret := _m.Called(ctx, route, opts)
var r0 *v1.Route
if rf, ok := ret.Get(0).(func(context.Context, *v1.Route, metav1.UpdateOptions) *v1.Route); ok {
r0 = rf(ctx, route, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1.Route)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *v1.Route, metav1.UpdateOptions) error); ok {
r1 = rf(ctx, route, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// UpdateStatus provides a mock function with given fields: ctx, route, opts
func (_m *Route) UpdateStatus(ctx context.Context, route *v1.Route, opts metav1.UpdateOptions) (*v1.Route, error) {
ret := _m.Called(ctx, route, opts)
var r0 *v1.Route
if rf, ok := ret.Get(0).(func(context.Context, *v1.Route, metav1.UpdateOptions) *v1.Route); ok {
r0 = rf(ctx, route, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1.Route)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *v1.Route, metav1.UpdateOptions) error); ok {
r1 = rf(ctx, route, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Watch provides a mock function with given fields: ctx, opts
func (_m *Route) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
ret := _m.Called(ctx, opts)
var r0 watch.Interface
if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) watch.Interface); ok {
r0 = rf(ctx, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(watch.Interface)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, metav1.ListOptions) error); ok {
r1 = rf(ctx, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}