mock/kubernetes/mock_ingress.go (165 lines of code) (raw):
// Code generated by mockery v2.10.4. DO NOT EDIT.
package mock
import (
context "context"
mock "github.com/stretchr/testify/mock"
v1 "k8s.io/api/networking/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
)
// Ingress is an autogenerated mock type for the Ingress type
type Ingress struct {
mock.Mock
}
// Create provides a mock function with given fields: ctx, ingress, opts
func (_m *Ingress) Create(ctx context.Context, ingress *v1.Ingress, opts metav1.CreateOptions) (*v1.Ingress, error) {
ret := _m.Called(ctx, ingress, opts)
var r0 *v1.Ingress
if rf, ok := ret.Get(0).(func(context.Context, *v1.Ingress, metav1.CreateOptions) *v1.Ingress); ok {
r0 = rf(ctx, ingress, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1.Ingress)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *v1.Ingress, metav1.CreateOptions) error); ok {
r1 = rf(ctx, ingress, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Delete provides a mock function with given fields: ctx, name, opts
func (_m *Ingress) 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 *Ingress) 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 *Ingress) Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Ingress, error) {
ret := _m.Called(ctx, name, opts)
var r0 *v1.Ingress
if rf, ok := ret.Get(0).(func(context.Context, string, metav1.GetOptions) *v1.Ingress); ok {
r0 = rf(ctx, name, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1.Ingress)
}
}
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 *Ingress) List(ctx context.Context, opts metav1.ListOptions) (*v1.IngressList, error) {
ret := _m.Called(ctx, opts)
var r0 *v1.IngressList
if rf, ok := ret.Get(0).(func(context.Context, metav1.ListOptions) *v1.IngressList); ok {
r0 = rf(ctx, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1.IngressList)
}
}
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 *Ingress) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*v1.Ingress, 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.Ingress
if rf, ok := ret.Get(0).(func(context.Context, string, types.PatchType, []byte, metav1.PatchOptions, ...string) *v1.Ingress); ok {
r0 = rf(ctx, name, pt, data, opts, subresources...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1.Ingress)
}
}
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, ingress, opts
func (_m *Ingress) Update(ctx context.Context, ingress *v1.Ingress, opts metav1.UpdateOptions) (*v1.Ingress, error) {
ret := _m.Called(ctx, ingress, opts)
var r0 *v1.Ingress
if rf, ok := ret.Get(0).(func(context.Context, *v1.Ingress, metav1.UpdateOptions) *v1.Ingress); ok {
r0 = rf(ctx, ingress, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1.Ingress)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *v1.Ingress, metav1.UpdateOptions) error); ok {
r1 = rf(ctx, ingress, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// UpdateStatus provides a mock function with given fields: ctx, ingress, opts
func (_m *Ingress) UpdateStatus(ctx context.Context, ingress *v1.Ingress, opts metav1.UpdateOptions) (*v1.Ingress, error) {
ret := _m.Called(ctx, ingress, opts)
var r0 *v1.Ingress
if rf, ok := ret.Get(0).(func(context.Context, *v1.Ingress, metav1.UpdateOptions) *v1.Ingress); ok {
r0 = rf(ctx, ingress, opts)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*v1.Ingress)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *v1.Ingress, metav1.UpdateOptions) error); ok {
r1 = rf(ctx, ingress, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Watch provides a mock function with given fields: ctx, opts
func (_m *Ingress) 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
}