mocks

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeCache

type FakeCache struct {
}

func (FakeCache) Get

func (FakeCache) GetInformer

func (FakeCache) GetInformer(ctx context.Context, obj client.Object) (toolscache.Informer, error)

func (FakeCache) GetInformerForKind

func (FakeCache) GetInformerForKind(gctx context.Context, vk schema.GroupVersionKind) (toolscache.Informer, error)

func (FakeCache) IndexField

func (FakeCache) IndexField(ctx context.Context, obj client.Object, field string, extractValue client.IndexerFunc) error

func (FakeCache) List

func (FakeCache) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error

func (FakeCache) Start

func (FakeCache) Start(ctx context.Context) error

func (FakeCache) WaitForCacheSync

func (FakeCache) WaitForCacheSync(ctx context.Context) bool

type FakeClient

type FakeClient struct {
	// contains filtered or unexported fields
}

FakeClient is a struct that implements client.Client for use in tests.

func NewClient

func NewClient(clientScheme *runtime.Scheme) FakeClient

func (FakeClient) Create

func (f FakeClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error

func (FakeClient) CreateRuntimeObject

func (f FakeClient) CreateRuntimeObject(ctx context.Context, obj runtime.Object, opts ...client.CreateOption) error

func (FakeClient) Delete

func (f FakeClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error

func (FakeClient) DeleteAllOf

func (FakeClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error

func (FakeClient) DeleteRuntimeObject

func (f FakeClient) DeleteRuntimeObject(ctx context.Context, obj runtime.Object, opts ...client.DeleteOption) error

func (FakeClient) Get

func (f FakeClient) Get(ctx context.Context, key client.ObjectKey, out client.Object, opts ...client.GetOption) error

func (FakeClient) List

func (f FakeClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error

func (FakeClient) Patch

func (FakeClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error

func (FakeClient) RESTMapper

func (FakeClient) RESTMapper() meta.RESTMapper

func (FakeClient) Scheme

func (FakeClient) Scheme() *runtime.Scheme

func (FakeClient) Status

func (FakeClient) Status() client.StatusWriter

func (FakeClient) Update

func (FakeClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error

type FakeStatusClient

type FakeStatusClient struct{}

func (FakeStatusClient) Patch

func (FakeStatusClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error

func (FakeStatusClient) Update

type Manager

type Manager struct {
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

Mock Types for Reconciler tests:

func NewManager

func NewManager(c FakeClient) Manager

func (Manager) Add

func (Manager) AddHealthzCheck

func (Manager) AddHealthzCheck(name string, check healthz.Checker) error

func (Manager) AddMetricsExtraHandler

func (Manager) AddMetricsExtraHandler(path string, handler http.Handler) error

func (Manager) AddReadyzCheck

func (Manager) AddReadyzCheck(name string, check healthz.Checker) error

func (Manager) Elected

func (Manager) Elected() <-chan struct{}

func (Manager) GetAPIReader

func (Manager) GetAPIReader() client.Reader

func (Manager) GetCache

func (m Manager) GetCache() cache.Cache

func (Manager) GetClient

func (m Manager) GetClient() client.Client

func (Manager) GetConfig

func (m Manager) GetConfig() *rest.Config

func (Manager) GetControllerOptions

func (m Manager) GetControllerOptions() v1alpha1.ControllerConfigurationSpec

func (Manager) GetEventRecorderFor

func (m Manager) GetEventRecorderFor(name string) record.EventRecorder

func (Manager) GetFieldIndexer

func (Manager) GetFieldIndexer() client.FieldIndexer

func (Manager) GetLogger

func (Manager) GetLogger() logr.Logger

func (Manager) GetRESTMapper

func (m Manager) GetRESTMapper() meta.RESTMapper

func (Manager) GetRecorder

func (Manager) GetRecorder(name string) record.EventRecorder

func (Manager) GetScheme

func (m Manager) GetScheme() *runtime.Scheme

func (Manager) GetWebhookServer

func (Manager) GetWebhookServer() *webhook.Server

func (Manager) SetFields

func (Manager) SetFields(interface{}) error

func (Manager) Start

func (Manager) Start(context.Context) error

Jump to

Keyboard shortcuts

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