fakes

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IngressCacheMock

type IngressCacheMock struct {
	// AddIndexerFunc mocks the AddIndexer method.
	AddIndexerFunc func(indexName string, indexer v1beta1.IngressIndexer)

	// GetFunc mocks the Get method.
	GetFunc func(namespace string, name string) (*v1beta1a.Ingress, error)

	// GetByIndexFunc mocks the GetByIndex method.
	GetByIndexFunc func(indexName string, key string) ([]*v1beta1a.Ingress, error)

	// ListFunc mocks the List method.
	ListFunc func(namespace string, selector labels.Selector) ([]*v1beta1a.Ingress, error)
	// contains filtered or unexported fields
}

IngressCacheMock is a mock implementation of IngressCache.

    func TestSomethingThatUsesIngressCache(t *testing.T) {

        // make and configure a mocked IngressCache
        mockedIngressCache := &IngressCacheMock{
            AddIndexerFunc: func(indexName string, indexer v1beta1.IngressIndexer)  {
	               panic("mock out the AddIndexer method")
            },
            GetFunc: func(namespace string, name string) (*v1beta1a.Ingress, error) {
	               panic("mock out the Get method")
            },
            GetByIndexFunc: func(indexName string, key string) ([]*v1beta1a.Ingress, error) {
	               panic("mock out the GetByIndex method")
            },
            ListFunc: func(namespace string, selector labels.Selector) ([]*v1beta1a.Ingress, error) {
	               panic("mock out the List method")
            },
        }

        // use mockedIngressCache in code that requires IngressCache
        // and then make assertions.

    }

func (*IngressCacheMock) AddIndexer

func (mock *IngressCacheMock) AddIndexer(indexName string, indexer v1beta1.IngressIndexer)

AddIndexer calls AddIndexerFunc.

func (*IngressCacheMock) AddIndexerCalls

func (mock *IngressCacheMock) AddIndexerCalls() []struct {
	IndexName string
	Indexer   v1beta1.IngressIndexer
}

AddIndexerCalls gets all the calls that were made to AddIndexer. Check the length with:

len(mockedIngressCache.AddIndexerCalls())

func (*IngressCacheMock) Get

func (mock *IngressCacheMock) Get(namespace string, name string) (*v1beta1a.Ingress, error)

Get calls GetFunc.

func (*IngressCacheMock) GetByIndex

func (mock *IngressCacheMock) GetByIndex(indexName string, key string) ([]*v1beta1a.Ingress, error)

GetByIndex calls GetByIndexFunc.

func (*IngressCacheMock) GetByIndexCalls

func (mock *IngressCacheMock) GetByIndexCalls() []struct {
	IndexName string
	Key       string
}

GetByIndexCalls gets all the calls that were made to GetByIndex. Check the length with:

len(mockedIngressCache.GetByIndexCalls())

func (*IngressCacheMock) GetCalls

func (mock *IngressCacheMock) GetCalls() []struct {
	Namespace string
	Name      string
}

GetCalls gets all the calls that were made to Get. Check the length with:

len(mockedIngressCache.GetCalls())

func (*IngressCacheMock) List

func (mock *IngressCacheMock) List(namespace string, selector labels.Selector) ([]*v1beta1a.Ingress, error)

List calls ListFunc.

func (*IngressCacheMock) ListCalls

func (mock *IngressCacheMock) ListCalls() []struct {
	Namespace string
	Selector  labels.Selector
}

ListCalls gets all the calls that were made to List. Check the length with:

len(mockedIngressCache.ListCalls())

type IngressClientMock

type IngressClientMock struct {
	// CreateFunc mocks the Create method.
	CreateFunc func(in1 *v1beta1a.Ingress) (*v1beta1a.Ingress, error)

	// DeleteFunc mocks the Delete method.
	DeleteFunc func(namespace string, name string, options *v1.DeleteOptions) error

	// GetFunc mocks the Get method.
	GetFunc func(namespace string, name string, options v1.GetOptions) (*v1beta1a.Ingress, error)

	// ListFunc mocks the List method.
	ListFunc func(namespace string, opts v1.ListOptions) (*v1beta1a.IngressList, error)

	// PatchFunc mocks the Patch method.
	PatchFunc func(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1beta1a.Ingress, error)

	// UpdateFunc mocks the Update method.
	UpdateFunc func(in1 *v1beta1a.Ingress) (*v1beta1a.Ingress, error)

	// UpdateStatusFunc mocks the UpdateStatus method.
	UpdateStatusFunc func(in1 *v1beta1a.Ingress) (*v1beta1a.Ingress, error)

	// WatchFunc mocks the Watch method.
	WatchFunc func(namespace string, opts v1.ListOptions) (watch.Interface, error)
	// contains filtered or unexported fields
}

IngressClientMock is a mock implementation of IngressClient.

    func TestSomethingThatUsesIngressClient(t *testing.T) {

        // make and configure a mocked IngressClient
        mockedIngressClient := &IngressClientMock{
            CreateFunc: func(in1 *v1beta1a.Ingress) (*v1beta1a.Ingress, error) {
	               panic("mock out the Create method")
            },
            DeleteFunc: func(namespace string, name string, options *v1.DeleteOptions) error {
	               panic("mock out the Delete method")
            },
            GetFunc: func(namespace string, name string, options v1.GetOptions) (*v1beta1a.Ingress, error) {
	               panic("mock out the Get method")
            },
            ListFunc: func(namespace string, opts v1.ListOptions) (*v1beta1a.IngressList, error) {
	               panic("mock out the List method")
            },
            PatchFunc: func(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1beta1a.Ingress, error) {
	               panic("mock out the Patch method")
            },
            UpdateFunc: func(in1 *v1beta1a.Ingress) (*v1beta1a.Ingress, error) {
	               panic("mock out the Update method")
            },
            UpdateStatusFunc: func(in1 *v1beta1a.Ingress) (*v1beta1a.Ingress, error) {
	               panic("mock out the UpdateStatus method")
            },
            WatchFunc: func(namespace string, opts v1.ListOptions) (watch.Interface, error) {
	               panic("mock out the Watch method")
            },
        }

        // use mockedIngressClient in code that requires IngressClient
        // and then make assertions.

    }

func (*IngressClientMock) Create

func (mock *IngressClientMock) Create(in1 *v1beta1a.Ingress) (*v1beta1a.Ingress, error)

Create calls CreateFunc.

func (*IngressClientMock) CreateCalls

func (mock *IngressClientMock) CreateCalls() []struct {
	In1 *v1beta1a.Ingress
}

CreateCalls gets all the calls that were made to Create. Check the length with:

len(mockedIngressClient.CreateCalls())

func (*IngressClientMock) Delete

func (mock *IngressClientMock) Delete(namespace string, name string, options *v1.DeleteOptions) error

Delete calls DeleteFunc.

func (*IngressClientMock) DeleteCalls

func (mock *IngressClientMock) DeleteCalls() []struct {
	Namespace string
	Name      string
	Options   *v1.DeleteOptions
}

DeleteCalls gets all the calls that were made to Delete. Check the length with:

len(mockedIngressClient.DeleteCalls())

func (*IngressClientMock) Get

func (mock *IngressClientMock) Get(namespace string, name string, options v1.GetOptions) (*v1beta1a.Ingress, error)

Get calls GetFunc.

func (*IngressClientMock) GetCalls

func (mock *IngressClientMock) GetCalls() []struct {
	Namespace string
	Name      string
	Options   v1.GetOptions
}

GetCalls gets all the calls that were made to Get. Check the length with:

len(mockedIngressClient.GetCalls())

func (*IngressClientMock) List

func (mock *IngressClientMock) List(namespace string, opts v1.ListOptions) (*v1beta1a.IngressList, error)

List calls ListFunc.

func (*IngressClientMock) ListCalls

func (mock *IngressClientMock) ListCalls() []struct {
	Namespace string
	Opts      v1.ListOptions
}

ListCalls gets all the calls that were made to List. Check the length with:

len(mockedIngressClient.ListCalls())

func (*IngressClientMock) Patch

func (mock *IngressClientMock) Patch(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1beta1a.Ingress, error)

Patch calls PatchFunc.

func (*IngressClientMock) PatchCalls

func (mock *IngressClientMock) PatchCalls() []struct {
	Namespace    string
	Name         string
	Pt           types.PatchType
	Data         []byte
	Subresources []string
}

PatchCalls gets all the calls that were made to Patch. Check the length with:

len(mockedIngressClient.PatchCalls())

func (*IngressClientMock) Update

func (mock *IngressClientMock) Update(in1 *v1beta1a.Ingress) (*v1beta1a.Ingress, error)

Update calls UpdateFunc.

func (*IngressClientMock) UpdateCalls

func (mock *IngressClientMock) UpdateCalls() []struct {
	In1 *v1beta1a.Ingress
}

UpdateCalls gets all the calls that were made to Update. Check the length with:

len(mockedIngressClient.UpdateCalls())

func (*IngressClientMock) UpdateStatus

func (mock *IngressClientMock) UpdateStatus(in1 *v1beta1a.Ingress) (*v1beta1a.Ingress, error)

UpdateStatus calls UpdateStatusFunc.

func (*IngressClientMock) UpdateStatusCalls

func (mock *IngressClientMock) UpdateStatusCalls() []struct {
	In1 *v1beta1a.Ingress
}

UpdateStatusCalls gets all the calls that were made to UpdateStatus. Check the length with:

len(mockedIngressClient.UpdateStatusCalls())

func (*IngressClientMock) Watch

func (mock *IngressClientMock) Watch(namespace string, opts v1.ListOptions) (watch.Interface, error)

Watch calls WatchFunc.

func (*IngressClientMock) WatchCalls

func (mock *IngressClientMock) WatchCalls() []struct {
	Namespace string
	Opts      v1.ListOptions
}

WatchCalls gets all the calls that were made to Watch. Check the length with:

len(mockedIngressClient.WatchCalls())

type IngressControllerMock

type IngressControllerMock struct {
	// AddGenericHandlerFunc mocks the AddGenericHandler method.
	AddGenericHandlerFunc func(ctx context.Context, name string, handler generic.Handler)

	// AddGenericRemoveHandlerFunc mocks the AddGenericRemoveHandler method.
	AddGenericRemoveHandlerFunc func(ctx context.Context, name string, handler generic.Handler)

	// CacheFunc mocks the Cache method.
	CacheFunc func() v1beta1.IngressCache

	// CreateFunc mocks the Create method.
	CreateFunc func(in1 *v1beta1a.Ingress) (*v1beta1a.Ingress, error)

	// DeleteFunc mocks the Delete method.
	DeleteFunc func(namespace string, name string, options *v1.DeleteOptions) error

	// EnqueueFunc mocks the Enqueue method.
	EnqueueFunc func(namespace string, name string)

	// GetFunc mocks the Get method.
	GetFunc func(namespace string, name string, options v1.GetOptions) (*v1beta1a.Ingress, error)

	// GroupVersionKindFunc mocks the GroupVersionKind method.
	GroupVersionKindFunc func() schema.GroupVersionKind

	// InformerFunc mocks the Informer method.
	InformerFunc func() cache.SharedIndexInformer

	// ListFunc mocks the List method.
	ListFunc func(namespace string, opts v1.ListOptions) (*v1beta1a.IngressList, error)

	// OnChangeFunc mocks the OnChange method.
	OnChangeFunc func(ctx context.Context, name string, sync v1beta1.IngressHandler)

	// OnRemoveFunc mocks the OnRemove method.
	OnRemoveFunc func(ctx context.Context, name string, sync v1beta1.IngressHandler)

	// PatchFunc mocks the Patch method.
	PatchFunc func(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1beta1a.Ingress, error)

	// UpdateFunc mocks the Update method.
	UpdateFunc func(in1 *v1beta1a.Ingress) (*v1beta1a.Ingress, error)

	// UpdateStatusFunc mocks the UpdateStatus method.
	UpdateStatusFunc func(in1 *v1beta1a.Ingress) (*v1beta1a.Ingress, error)

	// UpdaterFunc mocks the Updater method.
	UpdaterFunc func() generic.Updater

	// WatchFunc mocks the Watch method.
	WatchFunc func(namespace string, opts v1.ListOptions) (watch.Interface, error)
	// contains filtered or unexported fields
}

IngressControllerMock is a mock implementation of IngressController.

    func TestSomethingThatUsesIngressController(t *testing.T) {

        // make and configure a mocked IngressController
        mockedIngressController := &IngressControllerMock{
            AddGenericHandlerFunc: func(ctx context.Context, name string, handler generic.Handler)  {
	               panic("mock out the AddGenericHandler method")
            },
            AddGenericRemoveHandlerFunc: func(ctx context.Context, name string, handler generic.Handler)  {
	               panic("mock out the AddGenericRemoveHandler method")
            },
            CacheFunc: func() v1beta1.IngressCache {
	               panic("mock out the Cache method")
            },
            CreateFunc: func(in1 *v1beta1a.Ingress) (*v1beta1a.Ingress, error) {
	               panic("mock out the Create method")
            },
            DeleteFunc: func(namespace string, name string, options *v1.DeleteOptions) error {
	               panic("mock out the Delete method")
            },
            EnqueueFunc: func(namespace string, name string)  {
	               panic("mock out the Enqueue method")
            },
            GetFunc: func(namespace string, name string, options v1.GetOptions) (*v1beta1a.Ingress, error) {
	               panic("mock out the Get method")
            },
            GroupVersionKindFunc: func() schema.GroupVersionKind {
	               panic("mock out the GroupVersionKind method")
            },
            InformerFunc: func() cache.SharedIndexInformer {
	               panic("mock out the Informer method")
            },
            ListFunc: func(namespace string, opts v1.ListOptions) (*v1beta1a.IngressList, error) {
	               panic("mock out the List method")
            },
            OnChangeFunc: func(ctx context.Context, name string, sync v1beta1.IngressHandler)  {
	               panic("mock out the OnChange method")
            },
            OnRemoveFunc: func(ctx context.Context, name string, sync v1beta1.IngressHandler)  {
	               panic("mock out the OnRemove method")
            },
            PatchFunc: func(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1beta1a.Ingress, error) {
	               panic("mock out the Patch method")
            },
            UpdateFunc: func(in1 *v1beta1a.Ingress) (*v1beta1a.Ingress, error) {
	               panic("mock out the Update method")
            },
            UpdateStatusFunc: func(in1 *v1beta1a.Ingress) (*v1beta1a.Ingress, error) {
	               panic("mock out the UpdateStatus method")
            },
            UpdaterFunc: func() generic.Updater {
	               panic("mock out the Updater method")
            },
            WatchFunc: func(namespace string, opts v1.ListOptions) (watch.Interface, error) {
	               panic("mock out the Watch method")
            },
        }

        // use mockedIngressController in code that requires IngressController
        // and then make assertions.

    }

func (*IngressControllerMock) AddGenericHandler

func (mock *IngressControllerMock) AddGenericHandler(ctx context.Context, name string, handler generic.Handler)

AddGenericHandler calls AddGenericHandlerFunc.

func (*IngressControllerMock) AddGenericHandlerCalls

func (mock *IngressControllerMock) AddGenericHandlerCalls() []struct {
	Ctx     context.Context
	Name    string
	Handler generic.Handler
}

AddGenericHandlerCalls gets all the calls that were made to AddGenericHandler. Check the length with:

len(mockedIngressController.AddGenericHandlerCalls())

func (*IngressControllerMock) AddGenericRemoveHandler

func (mock *IngressControllerMock) AddGenericRemoveHandler(ctx context.Context, name string, handler generic.Handler)

AddGenericRemoveHandler calls AddGenericRemoveHandlerFunc.

func (*IngressControllerMock) AddGenericRemoveHandlerCalls

func (mock *IngressControllerMock) AddGenericRemoveHandlerCalls() []struct {
	Ctx     context.Context
	Name    string
	Handler generic.Handler
}

AddGenericRemoveHandlerCalls gets all the calls that were made to AddGenericRemoveHandler. Check the length with:

len(mockedIngressController.AddGenericRemoveHandlerCalls())

func (*IngressControllerMock) Cache

Cache calls CacheFunc.

func (*IngressControllerMock) CacheCalls

func (mock *IngressControllerMock) CacheCalls() []struct {
}

CacheCalls gets all the calls that were made to Cache. Check the length with:

len(mockedIngressController.CacheCalls())

func (*IngressControllerMock) Create

Create calls CreateFunc.

func (*IngressControllerMock) CreateCalls

func (mock *IngressControllerMock) CreateCalls() []struct {
	In1 *v1beta1a.Ingress
}

CreateCalls gets all the calls that were made to Create. Check the length with:

len(mockedIngressController.CreateCalls())

func (*IngressControllerMock) Delete

func (mock *IngressControllerMock) Delete(namespace string, name string, options *v1.DeleteOptions) error

Delete calls DeleteFunc.

func (*IngressControllerMock) DeleteCalls

func (mock *IngressControllerMock) DeleteCalls() []struct {
	Namespace string
	Name      string
	Options   *v1.DeleteOptions
}

DeleteCalls gets all the calls that were made to Delete. Check the length with:

len(mockedIngressController.DeleteCalls())

func (*IngressControllerMock) Enqueue

func (mock *IngressControllerMock) Enqueue(namespace string, name string)

Enqueue calls EnqueueFunc.

func (*IngressControllerMock) EnqueueCalls

func (mock *IngressControllerMock) EnqueueCalls() []struct {
	Namespace string
	Name      string
}

EnqueueCalls gets all the calls that were made to Enqueue. Check the length with:

len(mockedIngressController.EnqueueCalls())

func (*IngressControllerMock) Get

func (mock *IngressControllerMock) Get(namespace string, name string, options v1.GetOptions) (*v1beta1a.Ingress, error)

Get calls GetFunc.

func (*IngressControllerMock) GetCalls

func (mock *IngressControllerMock) GetCalls() []struct {
	Namespace string
	Name      string
	Options   v1.GetOptions
}

GetCalls gets all the calls that were made to Get. Check the length with:

len(mockedIngressController.GetCalls())

func (*IngressControllerMock) GroupVersionKind

func (mock *IngressControllerMock) GroupVersionKind() schema.GroupVersionKind

GroupVersionKind calls GroupVersionKindFunc.

func (*IngressControllerMock) GroupVersionKindCalls

func (mock *IngressControllerMock) GroupVersionKindCalls() []struct {
}

GroupVersionKindCalls gets all the calls that were made to GroupVersionKind. Check the length with:

len(mockedIngressController.GroupVersionKindCalls())

func (*IngressControllerMock) Informer

Informer calls InformerFunc.

func (*IngressControllerMock) InformerCalls

func (mock *IngressControllerMock) InformerCalls() []struct {
}

InformerCalls gets all the calls that were made to Informer. Check the length with:

len(mockedIngressController.InformerCalls())

func (*IngressControllerMock) List

func (mock *IngressControllerMock) List(namespace string, opts v1.ListOptions) (*v1beta1a.IngressList, error)

List calls ListFunc.

func (*IngressControllerMock) ListCalls

func (mock *IngressControllerMock) ListCalls() []struct {
	Namespace string
	Opts      v1.ListOptions
}

ListCalls gets all the calls that were made to List. Check the length with:

len(mockedIngressController.ListCalls())

func (*IngressControllerMock) OnChange

func (mock *IngressControllerMock) OnChange(ctx context.Context, name string, sync v1beta1.IngressHandler)

OnChange calls OnChangeFunc.

func (*IngressControllerMock) OnChangeCalls

func (mock *IngressControllerMock) OnChangeCalls() []struct {
	Ctx  context.Context
	Name string
	Sync v1beta1.IngressHandler
}

OnChangeCalls gets all the calls that were made to OnChange. Check the length with:

len(mockedIngressController.OnChangeCalls())

func (*IngressControllerMock) OnRemove

func (mock *IngressControllerMock) OnRemove(ctx context.Context, name string, sync v1beta1.IngressHandler)

OnRemove calls OnRemoveFunc.

func (*IngressControllerMock) OnRemoveCalls

func (mock *IngressControllerMock) OnRemoveCalls() []struct {
	Ctx  context.Context
	Name string
	Sync v1beta1.IngressHandler
}

OnRemoveCalls gets all the calls that were made to OnRemove. Check the length with:

len(mockedIngressController.OnRemoveCalls())

func (*IngressControllerMock) Patch

func (mock *IngressControllerMock) Patch(namespace string, name string, pt types.PatchType, data []byte, subresources ...string) (*v1beta1a.Ingress, error)

Patch calls PatchFunc.

func (*IngressControllerMock) PatchCalls

func (mock *IngressControllerMock) PatchCalls() []struct {
	Namespace    string
	Name         string
	Pt           types.PatchType
	Data         []byte
	Subresources []string
}

PatchCalls gets all the calls that were made to Patch. Check the length with:

len(mockedIngressController.PatchCalls())

func (*IngressControllerMock) Update

Update calls UpdateFunc.

func (*IngressControllerMock) UpdateCalls

func (mock *IngressControllerMock) UpdateCalls() []struct {
	In1 *v1beta1a.Ingress
}

UpdateCalls gets all the calls that were made to Update. Check the length with:

len(mockedIngressController.UpdateCalls())

func (*IngressControllerMock) UpdateStatus

func (mock *IngressControllerMock) UpdateStatus(in1 *v1beta1a.Ingress) (*v1beta1a.Ingress, error)

UpdateStatus calls UpdateStatusFunc.

func (*IngressControllerMock) UpdateStatusCalls

func (mock *IngressControllerMock) UpdateStatusCalls() []struct {
	In1 *v1beta1a.Ingress
}

UpdateStatusCalls gets all the calls that were made to UpdateStatus. Check the length with:

len(mockedIngressController.UpdateStatusCalls())

func (*IngressControllerMock) Updater

func (mock *IngressControllerMock) Updater() generic.Updater

Updater calls UpdaterFunc.

func (*IngressControllerMock) UpdaterCalls

func (mock *IngressControllerMock) UpdaterCalls() []struct {
}

UpdaterCalls gets all the calls that were made to Updater. Check the length with:

len(mockedIngressController.UpdaterCalls())

func (*IngressControllerMock) Watch

func (mock *IngressControllerMock) Watch(namespace string, opts v1.ListOptions) (watch.Interface, error)

Watch calls WatchFunc.

func (*IngressControllerMock) WatchCalls

func (mock *IngressControllerMock) WatchCalls() []struct {
	Namespace string
	Opts      v1.ListOptions
}

WatchCalls gets all the calls that were made to Watch. Check the length with:

len(mockedIngressController.WatchCalls())

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL