fakes

package
v0.0.0-20210120-9aea87... Latest Latest
Warning

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

Go to latest
Published: Jan 20, 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 PodSecurityPoliciesGetterMock

type PodSecurityPoliciesGetterMock struct {
	// PodSecurityPoliciesFunc mocks the PodSecurityPolicies method.
	PodSecurityPoliciesFunc func(namespace string) v1beta1a.PodSecurityPolicyInterface
	// contains filtered or unexported fields
}

PodSecurityPoliciesGetterMock is a mock implementation of PodSecurityPoliciesGetter.

    func TestSomethingThatUsesPodSecurityPoliciesGetter(t *testing.T) {

        // make and configure a mocked PodSecurityPoliciesGetter
        mockedPodSecurityPoliciesGetter := &PodSecurityPoliciesGetterMock{
            PodSecurityPoliciesFunc: func(namespace string) v1beta1a.PodSecurityPolicyInterface {
	               panic("mock out the PodSecurityPolicies method")
            },
        }

        // use mockedPodSecurityPoliciesGetter in code that requires PodSecurityPoliciesGetter
        // and then make assertions.

    }

func (*PodSecurityPoliciesGetterMock) PodSecurityPolicies

func (mock *PodSecurityPoliciesGetterMock) PodSecurityPolicies(namespace string) v1beta1a.PodSecurityPolicyInterface

PodSecurityPolicies calls PodSecurityPoliciesFunc.

func (*PodSecurityPoliciesGetterMock) PodSecurityPoliciesCalls

func (mock *PodSecurityPoliciesGetterMock) PodSecurityPoliciesCalls() []struct {
	Namespace string
}

PodSecurityPoliciesCalls gets all the calls that were made to PodSecurityPolicies. Check the length with:

len(mockedPodSecurityPoliciesGetter.PodSecurityPoliciesCalls())

type PodSecurityPolicyControllerMock

type PodSecurityPolicyControllerMock struct {
	// AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method.
	AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v1beta1a.PodSecurityPolicyHandlerFunc)

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

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

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

	// 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() v1beta1a.PodSecurityPolicyLister

	// 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
}

PodSecurityPolicyControllerMock is a mock implementation of PodSecurityPolicyController.

    func TestSomethingThatUsesPodSecurityPolicyController(t *testing.T) {

        // make and configure a mocked PodSecurityPolicyController
        mockedPodSecurityPolicyController := &PodSecurityPolicyControllerMock{
            AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v1beta1a.PodSecurityPolicyHandlerFunc)  {
	               panic("mock out the AddClusterScopedFeatureHandler method")
            },
            AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v1beta1a.PodSecurityPolicyHandlerFunc)  {
	               panic("mock out the AddClusterScopedHandler method")
            },
            AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v1beta1a.PodSecurityPolicyHandlerFunc)  {
	               panic("mock out the AddFeatureHandler method")
            },
            AddHandlerFunc: func(ctx context.Context, name string, handler v1beta1a.PodSecurityPolicyHandlerFunc)  {
	               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() v1beta1a.PodSecurityPolicyLister {
	               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 mockedPodSecurityPolicyController in code that requires PodSecurityPolicyController
        // and then make assertions.

    }

func (*PodSecurityPolicyControllerMock) AddClusterScopedFeatureHandler

func (mock *PodSecurityPolicyControllerMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, handler v1beta1a.PodSecurityPolicyHandlerFunc)

AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc.

func (*PodSecurityPolicyControllerMock) AddClusterScopedFeatureHandlerCalls

func (mock *PodSecurityPolicyControllerMock) AddClusterScopedFeatureHandlerCalls() []struct {
	Ctx         context.Context
	Enabled     func() bool
	Name        string
	ClusterName string
	Handler     v1beta1a.PodSecurityPolicyHandlerFunc
}

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

len(mockedPodSecurityPolicyController.AddClusterScopedFeatureHandlerCalls())

func (*PodSecurityPolicyControllerMock) AddClusterScopedHandler

func (mock *PodSecurityPolicyControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v1beta1a.PodSecurityPolicyHandlerFunc)

AddClusterScopedHandler calls AddClusterScopedHandlerFunc.

func (*PodSecurityPolicyControllerMock) AddClusterScopedHandlerCalls

func (mock *PodSecurityPolicyControllerMock) AddClusterScopedHandlerCalls() []struct {
	Ctx         context.Context
	Name        string
	ClusterName string
	Handler     v1beta1a.PodSecurityPolicyHandlerFunc
}

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

len(mockedPodSecurityPolicyController.AddClusterScopedHandlerCalls())

func (*PodSecurityPolicyControllerMock) AddFeatureHandler

func (mock *PodSecurityPolicyControllerMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v1beta1a.PodSecurityPolicyHandlerFunc)

AddFeatureHandler calls AddFeatureHandlerFunc.

func (*PodSecurityPolicyControllerMock) AddFeatureHandlerCalls

func (mock *PodSecurityPolicyControllerMock) AddFeatureHandlerCalls() []struct {
	Ctx     context.Context
	Enabled func() bool
	Name    string
	Sync    v1beta1a.PodSecurityPolicyHandlerFunc
}

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

len(mockedPodSecurityPolicyController.AddFeatureHandlerCalls())

func (*PodSecurityPolicyControllerMock) AddHandler

AddHandler calls AddHandlerFunc.

func (*PodSecurityPolicyControllerMock) AddHandlerCalls

func (mock *PodSecurityPolicyControllerMock) AddHandlerCalls() []struct {
	Ctx     context.Context
	Name    string
	Handler v1beta1a.PodSecurityPolicyHandlerFunc
}

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

len(mockedPodSecurityPolicyController.AddHandlerCalls())

func (*PodSecurityPolicyControllerMock) Enqueue

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

Enqueue calls EnqueueFunc.

func (*PodSecurityPolicyControllerMock) EnqueueAfter

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

EnqueueAfter calls EnqueueAfterFunc.

func (*PodSecurityPolicyControllerMock) EnqueueAfterCalls

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

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

len(mockedPodSecurityPolicyController.EnqueueAfterCalls())

func (*PodSecurityPolicyControllerMock) EnqueueCalls

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

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

len(mockedPodSecurityPolicyController.EnqueueCalls())

func (*PodSecurityPolicyControllerMock) Generic

Generic calls GenericFunc.

func (*PodSecurityPolicyControllerMock) GenericCalls

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

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

len(mockedPodSecurityPolicyController.GenericCalls())

func (*PodSecurityPolicyControllerMock) Informer

Informer calls InformerFunc.

func (*PodSecurityPolicyControllerMock) InformerCalls

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

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

len(mockedPodSecurityPolicyController.InformerCalls())

func (*PodSecurityPolicyControllerMock) Lister

Lister calls ListerFunc.

func (*PodSecurityPolicyControllerMock) ListerCalls

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

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

len(mockedPodSecurityPolicyController.ListerCalls())

func (*PodSecurityPolicyControllerMock) Start

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

Start calls StartFunc.

func (*PodSecurityPolicyControllerMock) StartCalls

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

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

len(mockedPodSecurityPolicyController.StartCalls())

func (*PodSecurityPolicyControllerMock) Sync

Sync calls SyncFunc.

func (*PodSecurityPolicyControllerMock) SyncCalls

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

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

len(mockedPodSecurityPolicyController.SyncCalls())

type PodSecurityPolicyInterfaceMock

type PodSecurityPolicyInterfaceMock struct {
	// AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method.
	AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v1beta1a.PodSecurityPolicyHandlerFunc)

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

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

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

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

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

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

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

	// ControllerFunc mocks the Controller method.
	ControllerFunc func() v1beta1a.PodSecurityPolicyController

	// CreateFunc mocks the Create method.
	CreateFunc func(in1 *v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error)

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

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

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

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

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

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

	// ListNamespacedFunc mocks the ListNamespaced method.
	ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v1beta1a.PodSecurityPolicyList, error)

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

	// UpdateFunc mocks the Update method.
	UpdateFunc func(in1 *v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error)

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

PodSecurityPolicyInterfaceMock is a mock implementation of PodSecurityPolicyInterface.

    func TestSomethingThatUsesPodSecurityPolicyInterface(t *testing.T) {

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

        // use mockedPodSecurityPolicyInterface in code that requires PodSecurityPolicyInterface
        // and then make assertions.

    }

func (*PodSecurityPolicyInterfaceMock) AddClusterScopedFeatureHandler

func (mock *PodSecurityPolicyInterfaceMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, sync v1beta1a.PodSecurityPolicyHandlerFunc)

AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc.

func (*PodSecurityPolicyInterfaceMock) AddClusterScopedFeatureHandlerCalls

func (mock *PodSecurityPolicyInterfaceMock) AddClusterScopedFeatureHandlerCalls() []struct {
	Ctx         context.Context
	Enabled     func() bool
	Name        string
	ClusterName string
	Sync        v1beta1a.PodSecurityPolicyHandlerFunc
}

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

len(mockedPodSecurityPolicyInterface.AddClusterScopedFeatureHandlerCalls())

func (*PodSecurityPolicyInterfaceMock) AddClusterScopedFeatureLifecycle

func (mock *PodSecurityPolicyInterfaceMock) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v1beta1a.PodSecurityPolicyLifecycle)

AddClusterScopedFeatureLifecycle calls AddClusterScopedFeatureLifecycleFunc.

func (*PodSecurityPolicyInterfaceMock) AddClusterScopedFeatureLifecycleCalls

func (mock *PodSecurityPolicyInterfaceMock) AddClusterScopedFeatureLifecycleCalls() []struct {
	Ctx         context.Context
	Enabled     func() bool
	Name        string
	ClusterName string
	Lifecycle   v1beta1a.PodSecurityPolicyLifecycle
}

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

len(mockedPodSecurityPolicyInterface.AddClusterScopedFeatureLifecycleCalls())

func (*PodSecurityPolicyInterfaceMock) AddClusterScopedHandler

func (mock *PodSecurityPolicyInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v1beta1a.PodSecurityPolicyHandlerFunc)

AddClusterScopedHandler calls AddClusterScopedHandlerFunc.

func (*PodSecurityPolicyInterfaceMock) AddClusterScopedHandlerCalls

func (mock *PodSecurityPolicyInterfaceMock) AddClusterScopedHandlerCalls() []struct {
	Ctx         context.Context
	Name        string
	ClusterName string
	Sync        v1beta1a.PodSecurityPolicyHandlerFunc
}

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

len(mockedPodSecurityPolicyInterface.AddClusterScopedHandlerCalls())

func (*PodSecurityPolicyInterfaceMock) AddClusterScopedLifecycle

func (mock *PodSecurityPolicyInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v1beta1a.PodSecurityPolicyLifecycle)

AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc.

func (*PodSecurityPolicyInterfaceMock) AddClusterScopedLifecycleCalls

func (mock *PodSecurityPolicyInterfaceMock) AddClusterScopedLifecycleCalls() []struct {
	Ctx         context.Context
	Name        string
	ClusterName string
	Lifecycle   v1beta1a.PodSecurityPolicyLifecycle
}

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

len(mockedPodSecurityPolicyInterface.AddClusterScopedLifecycleCalls())

func (*PodSecurityPolicyInterfaceMock) AddFeatureHandler

func (mock *PodSecurityPolicyInterfaceMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v1beta1a.PodSecurityPolicyHandlerFunc)

AddFeatureHandler calls AddFeatureHandlerFunc.

func (*PodSecurityPolicyInterfaceMock) AddFeatureHandlerCalls

func (mock *PodSecurityPolicyInterfaceMock) AddFeatureHandlerCalls() []struct {
	Ctx     context.Context
	Enabled func() bool
	Name    string
	Sync    v1beta1a.PodSecurityPolicyHandlerFunc
}

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

len(mockedPodSecurityPolicyInterface.AddFeatureHandlerCalls())

func (*PodSecurityPolicyInterfaceMock) AddFeatureLifecycle

func (mock *PodSecurityPolicyInterfaceMock) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle v1beta1a.PodSecurityPolicyLifecycle)

AddFeatureLifecycle calls AddFeatureLifecycleFunc.

func (*PodSecurityPolicyInterfaceMock) AddFeatureLifecycleCalls

func (mock *PodSecurityPolicyInterfaceMock) AddFeatureLifecycleCalls() []struct {
	Ctx       context.Context
	Enabled   func() bool
	Name      string
	Lifecycle v1beta1a.PodSecurityPolicyLifecycle
}

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

len(mockedPodSecurityPolicyInterface.AddFeatureLifecycleCalls())

func (*PodSecurityPolicyInterfaceMock) AddHandler

AddHandler calls AddHandlerFunc.

func (*PodSecurityPolicyInterfaceMock) AddHandlerCalls

func (mock *PodSecurityPolicyInterfaceMock) AddHandlerCalls() []struct {
	Ctx  context.Context
	Name string
	Sync v1beta1a.PodSecurityPolicyHandlerFunc
}

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

len(mockedPodSecurityPolicyInterface.AddHandlerCalls())

func (*PodSecurityPolicyInterfaceMock) AddLifecycle

AddLifecycle calls AddLifecycleFunc.

func (*PodSecurityPolicyInterfaceMock) AddLifecycleCalls

func (mock *PodSecurityPolicyInterfaceMock) AddLifecycleCalls() []struct {
	Ctx       context.Context
	Name      string
	Lifecycle v1beta1a.PodSecurityPolicyLifecycle
}

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

len(mockedPodSecurityPolicyInterface.AddLifecycleCalls())

func (*PodSecurityPolicyInterfaceMock) Controller

Controller calls ControllerFunc.

func (*PodSecurityPolicyInterfaceMock) ControllerCalls

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

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

len(mockedPodSecurityPolicyInterface.ControllerCalls())

func (*PodSecurityPolicyInterfaceMock) Create

Create calls CreateFunc.

func (*PodSecurityPolicyInterfaceMock) CreateCalls

func (mock *PodSecurityPolicyInterfaceMock) CreateCalls() []struct {
	In1 *v1beta1.PodSecurityPolicy
}

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

len(mockedPodSecurityPolicyInterface.CreateCalls())

func (*PodSecurityPolicyInterfaceMock) Delete

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

Delete calls DeleteFunc.

func (*PodSecurityPolicyInterfaceMock) DeleteCalls

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

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

len(mockedPodSecurityPolicyInterface.DeleteCalls())

func (*PodSecurityPolicyInterfaceMock) DeleteCollection

func (mock *PodSecurityPolicyInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error

DeleteCollection calls DeleteCollectionFunc.

func (*PodSecurityPolicyInterfaceMock) DeleteCollectionCalls

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

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

len(mockedPodSecurityPolicyInterface.DeleteCollectionCalls())

func (*PodSecurityPolicyInterfaceMock) DeleteNamespaced

func (mock *PodSecurityPolicyInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error

DeleteNamespaced calls DeleteNamespacedFunc.

func (*PodSecurityPolicyInterfaceMock) DeleteNamespacedCalls

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

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

len(mockedPodSecurityPolicyInterface.DeleteNamespacedCalls())

func (*PodSecurityPolicyInterfaceMock) Get

Get calls GetFunc.

func (*PodSecurityPolicyInterfaceMock) GetCalls

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

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

len(mockedPodSecurityPolicyInterface.GetCalls())

func (*PodSecurityPolicyInterfaceMock) GetNamespaced

func (mock *PodSecurityPolicyInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v1beta1.PodSecurityPolicy, error)

GetNamespaced calls GetNamespacedFunc.

func (*PodSecurityPolicyInterfaceMock) GetNamespacedCalls

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

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

len(mockedPodSecurityPolicyInterface.GetNamespacedCalls())

func (*PodSecurityPolicyInterfaceMock) List

List calls ListFunc.

func (*PodSecurityPolicyInterfaceMock) ListCalls

func (mock *PodSecurityPolicyInterfaceMock) ListCalls() []struct {
	Opts v1.ListOptions
}

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

len(mockedPodSecurityPolicyInterface.ListCalls())

func (*PodSecurityPolicyInterfaceMock) ListNamespaced

func (mock *PodSecurityPolicyInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v1beta1a.PodSecurityPolicyList, error)

ListNamespaced calls ListNamespacedFunc.

func (*PodSecurityPolicyInterfaceMock) ListNamespacedCalls

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

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

len(mockedPodSecurityPolicyInterface.ListNamespacedCalls())

func (*PodSecurityPolicyInterfaceMock) ObjectClient

ObjectClient calls ObjectClientFunc.

func (*PodSecurityPolicyInterfaceMock) ObjectClientCalls

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

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

len(mockedPodSecurityPolicyInterface.ObjectClientCalls())

func (*PodSecurityPolicyInterfaceMock) Update

Update calls UpdateFunc.

func (*PodSecurityPolicyInterfaceMock) UpdateCalls

func (mock *PodSecurityPolicyInterfaceMock) UpdateCalls() []struct {
	In1 *v1beta1.PodSecurityPolicy
}

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

len(mockedPodSecurityPolicyInterface.UpdateCalls())

func (*PodSecurityPolicyInterfaceMock) Watch

Watch calls WatchFunc.

func (*PodSecurityPolicyInterfaceMock) WatchCalls

func (mock *PodSecurityPolicyInterfaceMock) WatchCalls() []struct {
	Opts v1.ListOptions
}

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

len(mockedPodSecurityPolicyInterface.WatchCalls())

type PodSecurityPolicyListerMock

type PodSecurityPolicyListerMock struct {
	// GetFunc mocks the Get method.
	GetFunc func(namespace string, name string) (*v1beta1.PodSecurityPolicy, error)

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

PodSecurityPolicyListerMock is a mock implementation of PodSecurityPolicyLister.

    func TestSomethingThatUsesPodSecurityPolicyLister(t *testing.T) {

        // make and configure a mocked PodSecurityPolicyLister
        mockedPodSecurityPolicyLister := &PodSecurityPolicyListerMock{
            GetFunc: func(namespace string, name string) (*v1beta1.PodSecurityPolicy, error) {
	               panic("mock out the Get method")
            },
            ListFunc: func(namespace string, selector labels.Selector) ([]*v1beta1.PodSecurityPolicy, error) {
	               panic("mock out the List method")
            },
        }

        // use mockedPodSecurityPolicyLister in code that requires PodSecurityPolicyLister
        // and then make assertions.

    }

func (*PodSecurityPolicyListerMock) Get

Get calls GetFunc.

func (*PodSecurityPolicyListerMock) GetCalls

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

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

len(mockedPodSecurityPolicyLister.GetCalls())

func (*PodSecurityPolicyListerMock) List

func (mock *PodSecurityPolicyListerMock) List(namespace string, selector labels.Selector) ([]*v1beta1.PodSecurityPolicy, error)

List calls ListFunc.

func (*PodSecurityPolicyListerMock) ListCalls

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

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

len(mockedPodSecurityPolicyLister.ListCalls())

Jump to

Keyboard shortcuts

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