fakes

package
v0.0.0-20210118-569e9d... Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 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 NetworkPoliciesGetterMock

type NetworkPoliciesGetterMock struct {
	// NetworkPoliciesFunc mocks the NetworkPolicies method.
	NetworkPoliciesFunc func(namespace string) v1a.NetworkPolicyInterface
	// contains filtered or unexported fields
}

NetworkPoliciesGetterMock is a mock implementation of NetworkPoliciesGetter.

    func TestSomethingThatUsesNetworkPoliciesGetter(t *testing.T) {

        // make and configure a mocked NetworkPoliciesGetter
        mockedNetworkPoliciesGetter := &NetworkPoliciesGetterMock{
            NetworkPoliciesFunc: func(namespace string) v1a.NetworkPolicyInterface {
	               panic("mock out the NetworkPolicies method")
            },
        }

        // use mockedNetworkPoliciesGetter in code that requires NetworkPoliciesGetter
        // and then make assertions.

    }

func (*NetworkPoliciesGetterMock) NetworkPolicies

func (mock *NetworkPoliciesGetterMock) NetworkPolicies(namespace string) v1a.NetworkPolicyInterface

NetworkPolicies calls NetworkPoliciesFunc.

func (*NetworkPoliciesGetterMock) NetworkPoliciesCalls

func (mock *NetworkPoliciesGetterMock) NetworkPoliciesCalls() []struct {
	Namespace string
}

NetworkPoliciesCalls gets all the calls that were made to NetworkPolicies. Check the length with:

len(mockedNetworkPoliciesGetter.NetworkPoliciesCalls())

type NetworkPolicyControllerMock

type NetworkPolicyControllerMock struct {
	// AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method.
	AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v1a.NetworkPolicyHandlerFunc)

	// AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method.
	AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v1a.NetworkPolicyHandlerFunc)

	// AddFeatureHandlerFunc mocks the AddFeatureHandler method.
	AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v1a.NetworkPolicyHandlerFunc)

	// AddHandlerFunc mocks the AddHandler method.
	AddHandlerFunc func(ctx context.Context, name string, handler v1a.NetworkPolicyHandlerFunc)

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

	// EnqueueAfterFunc mocks the EnqueueAfter method.
	EnqueueAfterFunc func(namespace string, name string, after time.Duration)

	// GenericFunc mocks the Generic method.
	GenericFunc func() controller.GenericController

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

	// ListerFunc mocks the Lister method.
	ListerFunc func() v1a.NetworkPolicyLister

	// StartFunc mocks the Start method.
	StartFunc func(ctx context.Context, threadiness int) error

	// SyncFunc mocks the Sync method.
	SyncFunc func(ctx context.Context) error
	// contains filtered or unexported fields
}

NetworkPolicyControllerMock is a mock implementation of NetworkPolicyController.

    func TestSomethingThatUsesNetworkPolicyController(t *testing.T) {

        // make and configure a mocked NetworkPolicyController
        mockedNetworkPolicyController := &NetworkPolicyControllerMock{
            AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v1a.NetworkPolicyHandlerFunc)  {
	               panic("mock out the AddClusterScopedFeatureHandler method")
            },
            AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1a.NetworkPolicyHandlerFunc)  {
	               panic("mock out the AddClusterScopedHandler method")
            },
            AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v1a.NetworkPolicyHandlerFunc)  {
	               panic("mock out the AddFeatureHandler method")
            },
            AddHandlerFunc: func(ctx context.Context, name string, handler v1a.NetworkPolicyHandlerFunc)  {
	               panic("mock out the AddHandler method")
            },
            EnqueueFunc: func(namespace string, name string)  {
	               panic("mock out the Enqueue method")
            },
            EnqueueAfterFunc: func(namespace string, name string, after time.Duration)  {
	               panic("mock out the EnqueueAfter method")
            },
            GenericFunc: func() controller.GenericController {
	               panic("mock out the Generic method")
            },
            InformerFunc: func() cache.SharedIndexInformer {
	               panic("mock out the Informer method")
            },
            ListerFunc: func() v1a.NetworkPolicyLister {
	               panic("mock out the Lister method")
            },
            StartFunc: func(ctx context.Context, threadiness int) error {
	               panic("mock out the Start method")
            },
            SyncFunc: func(ctx context.Context) error {
	               panic("mock out the Sync method")
            },
        }

        // use mockedNetworkPolicyController in code that requires NetworkPolicyController
        // and then make assertions.

    }

func (*NetworkPolicyControllerMock) AddClusterScopedFeatureHandler

func (mock *NetworkPolicyControllerMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, handler v1a.NetworkPolicyHandlerFunc)

AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc.

func (*NetworkPolicyControllerMock) AddClusterScopedFeatureHandlerCalls

func (mock *NetworkPolicyControllerMock) AddClusterScopedFeatureHandlerCalls() []struct {
	Ctx         context.Context
	Enabled     func() bool
	Name        string
	ClusterName string
	Handler     v1a.NetworkPolicyHandlerFunc
}

AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler. Check the length with:

len(mockedNetworkPolicyController.AddClusterScopedFeatureHandlerCalls())

func (*NetworkPolicyControllerMock) AddClusterScopedHandler

func (mock *NetworkPolicyControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1a.NetworkPolicyHandlerFunc)

AddClusterScopedHandler calls AddClusterScopedHandlerFunc.

func (*NetworkPolicyControllerMock) AddClusterScopedHandlerCalls

func (mock *NetworkPolicyControllerMock) AddClusterScopedHandlerCalls() []struct {
	Ctx         context.Context
	Name        string
	ClusterName string
	Handler     v1a.NetworkPolicyHandlerFunc
}

AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. Check the length with:

len(mockedNetworkPolicyController.AddClusterScopedHandlerCalls())

func (*NetworkPolicyControllerMock) AddFeatureHandler

func (mock *NetworkPolicyControllerMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v1a.NetworkPolicyHandlerFunc)

AddFeatureHandler calls AddFeatureHandlerFunc.

func (*NetworkPolicyControllerMock) AddFeatureHandlerCalls

func (mock *NetworkPolicyControllerMock) AddFeatureHandlerCalls() []struct {
	Ctx     context.Context
	Enabled func() bool
	Name    string
	Sync    v1a.NetworkPolicyHandlerFunc
}

AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler. Check the length with:

len(mockedNetworkPolicyController.AddFeatureHandlerCalls())

func (*NetworkPolicyControllerMock) AddHandler

func (mock *NetworkPolicyControllerMock) AddHandler(ctx context.Context, name string, handler v1a.NetworkPolicyHandlerFunc)

AddHandler calls AddHandlerFunc.

func (*NetworkPolicyControllerMock) AddHandlerCalls

func (mock *NetworkPolicyControllerMock) AddHandlerCalls() []struct {
	Ctx     context.Context
	Name    string
	Handler v1a.NetworkPolicyHandlerFunc
}

AddHandlerCalls gets all the calls that were made to AddHandler. Check the length with:

len(mockedNetworkPolicyController.AddHandlerCalls())

func (*NetworkPolicyControllerMock) Enqueue

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

Enqueue calls EnqueueFunc.

func (*NetworkPolicyControllerMock) EnqueueAfter

func (mock *NetworkPolicyControllerMock) EnqueueAfter(namespace string, name string, after time.Duration)

EnqueueAfter calls EnqueueAfterFunc.

func (*NetworkPolicyControllerMock) EnqueueAfterCalls

func (mock *NetworkPolicyControllerMock) EnqueueAfterCalls() []struct {
	Namespace string
	Name      string
	After     time.Duration
}

EnqueueAfterCalls gets all the calls that were made to EnqueueAfter. Check the length with:

len(mockedNetworkPolicyController.EnqueueAfterCalls())

func (*NetworkPolicyControllerMock) EnqueueCalls

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

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

len(mockedNetworkPolicyController.EnqueueCalls())

func (*NetworkPolicyControllerMock) Generic

Generic calls GenericFunc.

func (*NetworkPolicyControllerMock) GenericCalls

func (mock *NetworkPolicyControllerMock) GenericCalls() []struct {
}

GenericCalls gets all the calls that were made to Generic. Check the length with:

len(mockedNetworkPolicyController.GenericCalls())

func (*NetworkPolicyControllerMock) Informer

Informer calls InformerFunc.

func (*NetworkPolicyControllerMock) InformerCalls

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

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

len(mockedNetworkPolicyController.InformerCalls())

func (*NetworkPolicyControllerMock) Lister

Lister calls ListerFunc.

func (*NetworkPolicyControllerMock) ListerCalls

func (mock *NetworkPolicyControllerMock) ListerCalls() []struct {
}

ListerCalls gets all the calls that were made to Lister. Check the length with:

len(mockedNetworkPolicyController.ListerCalls())

func (*NetworkPolicyControllerMock) Start

func (mock *NetworkPolicyControllerMock) Start(ctx context.Context, threadiness int) error

Start calls StartFunc.

func (*NetworkPolicyControllerMock) StartCalls

func (mock *NetworkPolicyControllerMock) StartCalls() []struct {
	Ctx         context.Context
	Threadiness int
}

StartCalls gets all the calls that were made to Start. Check the length with:

len(mockedNetworkPolicyController.StartCalls())

func (*NetworkPolicyControllerMock) Sync

Sync calls SyncFunc.

func (*NetworkPolicyControllerMock) SyncCalls

func (mock *NetworkPolicyControllerMock) SyncCalls() []struct {
	Ctx context.Context
}

SyncCalls gets all the calls that were made to Sync. Check the length with:

len(mockedNetworkPolicyController.SyncCalls())

type NetworkPolicyInterfaceMock

type NetworkPolicyInterfaceMock struct {
	// AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method.
	AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v1a.NetworkPolicyHandlerFunc)

	// AddClusterScopedFeatureLifecycleFunc mocks the AddClusterScopedFeatureLifecycle method.
	AddClusterScopedFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v1a.NetworkPolicyLifecycle)

	// AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method.
	AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v1a.NetworkPolicyHandlerFunc)

	// AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method.
	AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v1a.NetworkPolicyLifecycle)

	// AddFeatureHandlerFunc mocks the AddFeatureHandler method.
	AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v1a.NetworkPolicyHandlerFunc)

	// AddFeatureLifecycleFunc mocks the AddFeatureLifecycle method.
	AddFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, lifecycle v1a.NetworkPolicyLifecycle)

	// AddHandlerFunc mocks the AddHandler method.
	AddHandlerFunc func(ctx context.Context, name string, sync v1a.NetworkPolicyHandlerFunc)

	// AddLifecycleFunc mocks the AddLifecycle method.
	AddLifecycleFunc func(ctx context.Context, name string, lifecycle v1a.NetworkPolicyLifecycle)

	// ControllerFunc mocks the Controller method.
	ControllerFunc func() v1a.NetworkPolicyController

	// CreateFunc mocks the Create method.
	CreateFunc func(in1 *v1.NetworkPolicy) (*v1.NetworkPolicy, error)

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

	// DeleteCollectionFunc mocks the DeleteCollection method.
	DeleteCollectionFunc func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error

	// DeleteNamespacedFunc mocks the DeleteNamespaced method.
	DeleteNamespacedFunc func(namespace string, name string, options *v1b.DeleteOptions) error

	// GetFunc mocks the Get method.
	GetFunc func(name string, opts v1b.GetOptions) (*v1.NetworkPolicy, error)

	// GetNamespacedFunc mocks the GetNamespaced method.
	GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.NetworkPolicy, error)

	// ListFunc mocks the List method.
	ListFunc func(opts v1b.ListOptions) (*v1a.NetworkPolicyList, error)

	// ListNamespacedFunc mocks the ListNamespaced method.
	ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.NetworkPolicyList, error)

	// ObjectClientFunc mocks the ObjectClient method.
	ObjectClientFunc func() *objectclient.ObjectClient

	// UpdateFunc mocks the Update method.
	UpdateFunc func(in1 *v1.NetworkPolicy) (*v1.NetworkPolicy, error)

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

NetworkPolicyInterfaceMock is a mock implementation of NetworkPolicyInterface.

    func TestSomethingThatUsesNetworkPolicyInterface(t *testing.T) {

        // make and configure a mocked NetworkPolicyInterface
        mockedNetworkPolicyInterface := &NetworkPolicyInterfaceMock{
            AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v1a.NetworkPolicyHandlerFunc)  {
	               panic("mock out the AddClusterScopedFeatureHandler method")
            },
            AddClusterScopedFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v1a.NetworkPolicyLifecycle)  {
	               panic("mock out the AddClusterScopedFeatureLifecycle method")
            },
            AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v1a.NetworkPolicyHandlerFunc)  {
	               panic("mock out the AddClusterScopedHandler method")
            },
            AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v1a.NetworkPolicyLifecycle)  {
	               panic("mock out the AddClusterScopedLifecycle method")
            },
            AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v1a.NetworkPolicyHandlerFunc)  {
	               panic("mock out the AddFeatureHandler method")
            },
            AddFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, lifecycle v1a.NetworkPolicyLifecycle)  {
	               panic("mock out the AddFeatureLifecycle method")
            },
            AddHandlerFunc: func(ctx context.Context, name string, sync v1a.NetworkPolicyHandlerFunc)  {
	               panic("mock out the AddHandler method")
            },
            AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v1a.NetworkPolicyLifecycle)  {
	               panic("mock out the AddLifecycle method")
            },
            ControllerFunc: func() v1a.NetworkPolicyController {
	               panic("mock out the Controller method")
            },
            CreateFunc: func(in1 *v1.NetworkPolicy) (*v1.NetworkPolicy, error) {
	               panic("mock out the Create method")
            },
            DeleteFunc: func(name string, options *v1b.DeleteOptions) error {
	               panic("mock out the Delete method")
            },
            DeleteCollectionFunc: func(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error {
	               panic("mock out the DeleteCollection method")
            },
            DeleteNamespacedFunc: func(namespace string, name string, options *v1b.DeleteOptions) error {
	               panic("mock out the DeleteNamespaced method")
            },
            GetFunc: func(name string, opts v1b.GetOptions) (*v1.NetworkPolicy, error) {
	               panic("mock out the Get method")
            },
            GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.NetworkPolicy, error) {
	               panic("mock out the GetNamespaced method")
            },
            ListFunc: func(opts v1b.ListOptions) (*v1a.NetworkPolicyList, error) {
	               panic("mock out the List method")
            },
            ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.NetworkPolicyList, error) {
	               panic("mock out the ListNamespaced method")
            },
            ObjectClientFunc: func() *objectclient.ObjectClient {
	               panic("mock out the ObjectClient method")
            },
            UpdateFunc: func(in1 *v1.NetworkPolicy) (*v1.NetworkPolicy, error) {
	               panic("mock out the Update method")
            },
            WatchFunc: func(opts v1b.ListOptions) (watch.Interface, error) {
	               panic("mock out the Watch method")
            },
        }

        // use mockedNetworkPolicyInterface in code that requires NetworkPolicyInterface
        // and then make assertions.

    }

func (*NetworkPolicyInterfaceMock) AddClusterScopedFeatureHandler

func (mock *NetworkPolicyInterfaceMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, sync v1a.NetworkPolicyHandlerFunc)

AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc.

func (*NetworkPolicyInterfaceMock) AddClusterScopedFeatureHandlerCalls

func (mock *NetworkPolicyInterfaceMock) AddClusterScopedFeatureHandlerCalls() []struct {
	Ctx         context.Context
	Enabled     func() bool
	Name        string
	ClusterName string
	Sync        v1a.NetworkPolicyHandlerFunc
}

AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler. Check the length with:

len(mockedNetworkPolicyInterface.AddClusterScopedFeatureHandlerCalls())

func (*NetworkPolicyInterfaceMock) AddClusterScopedFeatureLifecycle

func (mock *NetworkPolicyInterfaceMock) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v1a.NetworkPolicyLifecycle)

AddClusterScopedFeatureLifecycle calls AddClusterScopedFeatureLifecycleFunc.

func (*NetworkPolicyInterfaceMock) AddClusterScopedFeatureLifecycleCalls

func (mock *NetworkPolicyInterfaceMock) AddClusterScopedFeatureLifecycleCalls() []struct {
	Ctx         context.Context
	Enabled     func() bool
	Name        string
	ClusterName string
	Lifecycle   v1a.NetworkPolicyLifecycle
}

AddClusterScopedFeatureLifecycleCalls gets all the calls that were made to AddClusterScopedFeatureLifecycle. Check the length with:

len(mockedNetworkPolicyInterface.AddClusterScopedFeatureLifecycleCalls())

func (*NetworkPolicyInterfaceMock) AddClusterScopedHandler

func (mock *NetworkPolicyInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1a.NetworkPolicyHandlerFunc)

AddClusterScopedHandler calls AddClusterScopedHandlerFunc.

func (*NetworkPolicyInterfaceMock) AddClusterScopedHandlerCalls

func (mock *NetworkPolicyInterfaceMock) AddClusterScopedHandlerCalls() []struct {
	Ctx         context.Context
	Name        string
	ClusterName string
	Sync        v1a.NetworkPolicyHandlerFunc
}

AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. Check the length with:

len(mockedNetworkPolicyInterface.AddClusterScopedHandlerCalls())

func (*NetworkPolicyInterfaceMock) AddClusterScopedLifecycle

func (mock *NetworkPolicyInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1a.NetworkPolicyLifecycle)

AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc.

func (*NetworkPolicyInterfaceMock) AddClusterScopedLifecycleCalls

func (mock *NetworkPolicyInterfaceMock) AddClusterScopedLifecycleCalls() []struct {
	Ctx         context.Context
	Name        string
	ClusterName string
	Lifecycle   v1a.NetworkPolicyLifecycle
}

AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. Check the length with:

len(mockedNetworkPolicyInterface.AddClusterScopedLifecycleCalls())

func (*NetworkPolicyInterfaceMock) AddFeatureHandler

func (mock *NetworkPolicyInterfaceMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v1a.NetworkPolicyHandlerFunc)

AddFeatureHandler calls AddFeatureHandlerFunc.

func (*NetworkPolicyInterfaceMock) AddFeatureHandlerCalls

func (mock *NetworkPolicyInterfaceMock) AddFeatureHandlerCalls() []struct {
	Ctx     context.Context
	Enabled func() bool
	Name    string
	Sync    v1a.NetworkPolicyHandlerFunc
}

AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler. Check the length with:

len(mockedNetworkPolicyInterface.AddFeatureHandlerCalls())

func (*NetworkPolicyInterfaceMock) AddFeatureLifecycle

func (mock *NetworkPolicyInterfaceMock) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle v1a.NetworkPolicyLifecycle)

AddFeatureLifecycle calls AddFeatureLifecycleFunc.

func (*NetworkPolicyInterfaceMock) AddFeatureLifecycleCalls

func (mock *NetworkPolicyInterfaceMock) AddFeatureLifecycleCalls() []struct {
	Ctx       context.Context
	Enabled   func() bool
	Name      string
	Lifecycle v1a.NetworkPolicyLifecycle
}

AddFeatureLifecycleCalls gets all the calls that were made to AddFeatureLifecycle. Check the length with:

len(mockedNetworkPolicyInterface.AddFeatureLifecycleCalls())

func (*NetworkPolicyInterfaceMock) AddHandler

AddHandler calls AddHandlerFunc.

func (*NetworkPolicyInterfaceMock) AddHandlerCalls

func (mock *NetworkPolicyInterfaceMock) AddHandlerCalls() []struct {
	Ctx  context.Context
	Name string
	Sync v1a.NetworkPolicyHandlerFunc
}

AddHandlerCalls gets all the calls that were made to AddHandler. Check the length with:

len(mockedNetworkPolicyInterface.AddHandlerCalls())

func (*NetworkPolicyInterfaceMock) AddLifecycle

func (mock *NetworkPolicyInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v1a.NetworkPolicyLifecycle)

AddLifecycle calls AddLifecycleFunc.

func (*NetworkPolicyInterfaceMock) AddLifecycleCalls

func (mock *NetworkPolicyInterfaceMock) AddLifecycleCalls() []struct {
	Ctx       context.Context
	Name      string
	Lifecycle v1a.NetworkPolicyLifecycle
}

AddLifecycleCalls gets all the calls that were made to AddLifecycle. Check the length with:

len(mockedNetworkPolicyInterface.AddLifecycleCalls())

func (*NetworkPolicyInterfaceMock) Controller

Controller calls ControllerFunc.

func (*NetworkPolicyInterfaceMock) ControllerCalls

func (mock *NetworkPolicyInterfaceMock) ControllerCalls() []struct {
}

ControllerCalls gets all the calls that were made to Controller. Check the length with:

len(mockedNetworkPolicyInterface.ControllerCalls())

func (*NetworkPolicyInterfaceMock) Create

Create calls CreateFunc.

func (*NetworkPolicyInterfaceMock) CreateCalls

func (mock *NetworkPolicyInterfaceMock) CreateCalls() []struct {
	In1 *v1.NetworkPolicy
}

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

len(mockedNetworkPolicyInterface.CreateCalls())

func (*NetworkPolicyInterfaceMock) Delete

func (mock *NetworkPolicyInterfaceMock) Delete(name string, options *v1b.DeleteOptions) error

Delete calls DeleteFunc.

func (*NetworkPolicyInterfaceMock) DeleteCalls

func (mock *NetworkPolicyInterfaceMock) DeleteCalls() []struct {
	Name    string
	Options *v1b.DeleteOptions
}

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

len(mockedNetworkPolicyInterface.DeleteCalls())

func (*NetworkPolicyInterfaceMock) DeleteCollection

func (mock *NetworkPolicyInterfaceMock) DeleteCollection(deleteOpts *v1b.DeleteOptions, listOpts v1b.ListOptions) error

DeleteCollection calls DeleteCollectionFunc.

func (*NetworkPolicyInterfaceMock) DeleteCollectionCalls

func (mock *NetworkPolicyInterfaceMock) DeleteCollectionCalls() []struct {
	DeleteOpts *v1b.DeleteOptions
	ListOpts   v1b.ListOptions
}

DeleteCollectionCalls gets all the calls that were made to DeleteCollection. Check the length with:

len(mockedNetworkPolicyInterface.DeleteCollectionCalls())

func (*NetworkPolicyInterfaceMock) DeleteNamespaced

func (mock *NetworkPolicyInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1b.DeleteOptions) error

DeleteNamespaced calls DeleteNamespacedFunc.

func (*NetworkPolicyInterfaceMock) DeleteNamespacedCalls

func (mock *NetworkPolicyInterfaceMock) DeleteNamespacedCalls() []struct {
	Namespace string
	Name      string
	Options   *v1b.DeleteOptions
}

DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. Check the length with:

len(mockedNetworkPolicyInterface.DeleteNamespacedCalls())

func (*NetworkPolicyInterfaceMock) Get

Get calls GetFunc.

func (*NetworkPolicyInterfaceMock) GetCalls

func (mock *NetworkPolicyInterfaceMock) GetCalls() []struct {
	Name string
	Opts v1b.GetOptions
}

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

len(mockedNetworkPolicyInterface.GetCalls())

func (*NetworkPolicyInterfaceMock) GetNamespaced

func (mock *NetworkPolicyInterfaceMock) GetNamespaced(namespace string, name string, opts v1b.GetOptions) (*v1.NetworkPolicy, error)

GetNamespaced calls GetNamespacedFunc.

func (*NetworkPolicyInterfaceMock) GetNamespacedCalls

func (mock *NetworkPolicyInterfaceMock) GetNamespacedCalls() []struct {
	Namespace string
	Name      string
	Opts      v1b.GetOptions
}

GetNamespacedCalls gets all the calls that were made to GetNamespaced. Check the length with:

len(mockedNetworkPolicyInterface.GetNamespacedCalls())

func (*NetworkPolicyInterfaceMock) List

List calls ListFunc.

func (*NetworkPolicyInterfaceMock) ListCalls

func (mock *NetworkPolicyInterfaceMock) ListCalls() []struct {
	Opts v1b.ListOptions
}

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

len(mockedNetworkPolicyInterface.ListCalls())

func (*NetworkPolicyInterfaceMock) ListNamespaced

func (mock *NetworkPolicyInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.NetworkPolicyList, error)

ListNamespaced calls ListNamespacedFunc.

func (*NetworkPolicyInterfaceMock) ListNamespacedCalls

func (mock *NetworkPolicyInterfaceMock) ListNamespacedCalls() []struct {
	Namespace string
	Opts      v1b.ListOptions
}

ListNamespacedCalls gets all the calls that were made to ListNamespaced. Check the length with:

len(mockedNetworkPolicyInterface.ListNamespacedCalls())

func (*NetworkPolicyInterfaceMock) ObjectClient

ObjectClient calls ObjectClientFunc.

func (*NetworkPolicyInterfaceMock) ObjectClientCalls

func (mock *NetworkPolicyInterfaceMock) ObjectClientCalls() []struct {
}

ObjectClientCalls gets all the calls that were made to ObjectClient. Check the length with:

len(mockedNetworkPolicyInterface.ObjectClientCalls())

func (*NetworkPolicyInterfaceMock) Update

Update calls UpdateFunc.

func (*NetworkPolicyInterfaceMock) UpdateCalls

func (mock *NetworkPolicyInterfaceMock) UpdateCalls() []struct {
	In1 *v1.NetworkPolicy
}

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

len(mockedNetworkPolicyInterface.UpdateCalls())

func (*NetworkPolicyInterfaceMock) Watch

Watch calls WatchFunc.

func (*NetworkPolicyInterfaceMock) WatchCalls

func (mock *NetworkPolicyInterfaceMock) WatchCalls() []struct {
	Opts v1b.ListOptions
}

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

len(mockedNetworkPolicyInterface.WatchCalls())

type NetworkPolicyListerMock

type NetworkPolicyListerMock struct {
	// GetFunc mocks the Get method.
	GetFunc func(namespace string, name string) (*v1.NetworkPolicy, error)

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

NetworkPolicyListerMock is a mock implementation of NetworkPolicyLister.

    func TestSomethingThatUsesNetworkPolicyLister(t *testing.T) {

        // make and configure a mocked NetworkPolicyLister
        mockedNetworkPolicyLister := &NetworkPolicyListerMock{
            GetFunc: func(namespace string, name string) (*v1.NetworkPolicy, error) {
	               panic("mock out the Get method")
            },
            ListFunc: func(namespace string, selector labels.Selector) ([]*v1.NetworkPolicy, error) {
	               panic("mock out the List method")
            },
        }

        // use mockedNetworkPolicyLister in code that requires NetworkPolicyLister
        // and then make assertions.

    }

func (*NetworkPolicyListerMock) Get

func (mock *NetworkPolicyListerMock) Get(namespace string, name string) (*v1.NetworkPolicy, error)

Get calls GetFunc.

func (*NetworkPolicyListerMock) GetCalls

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

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

len(mockedNetworkPolicyLister.GetCalls())

func (*NetworkPolicyListerMock) List

func (mock *NetworkPolicyListerMock) List(namespace string, selector labels.Selector) ([]*v1.NetworkPolicy, error)

List calls ListFunc.

func (*NetworkPolicyListerMock) ListCalls

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

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

len(mockedNetworkPolicyLister.ListCalls())

Jump to

Keyboard shortcuts

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