testing

package
v0.2.5-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeClient

type FakeClient struct {
	GetFn                func(ctx context.Context, call int, key ctrlclient.ObjectKey, obj ctrlclient.Object, opts ...ctrlclient.GetOption) error
	CreateFn             func(ctx context.Context, call int, obj ctrlclient.Object, opts ...ctrlclient.CreateOption) error
	UpdateFn             func(ctx context.Context, call int, obj ctrlclient.Object, opts ...ctrlclient.UpdateOption) error
	DeleteFn             func(ctx context.Context, call int, obj ctrlclient.Object, opts ...ctrlclient.DeleteOption) error
	ListFn               func(ctx context.Context, call int, list ctrlclient.ObjectList, opts ...ctrlclient.ListOption) error
	PatchFn              func(ctx context.Context, call int, obj ctrlclient.Object, patch ctrlclient.Patch, opts ...ctrlclient.PatchOption) error
	IsObjectNamespacedFn func(call int, obj runtime.Object) (bool, error)
	RESTMapperFn         func(call int) meta.RESTMapper
	// contains filtered or unexported fields
}

TODO: not thread safe

func (*FakeClient) Create

func (c *FakeClient) Create(ctx context.Context, obj ctrlclient.Object, opts ...ctrlclient.CreateOption) error

func (*FakeClient) Delete

func (c *FakeClient) Delete(ctx context.Context, obj ctrlclient.Object, opts ...ctrlclient.DeleteOption) error

func (*FakeClient) Get

func (*FakeClient) IsObjectNamespaced

func (c *FakeClient) IsObjectNamespaced(obj runtime.Object) (bool, error)

func (*FakeClient) List

func (*FakeClient) NumCalls

func (c *FakeClient) NumCalls() int

func (*FakeClient) Patch

func (*FakeClient) RESTMapper added in v0.1.3

func (c *FakeClient) RESTMapper() meta.RESTMapper

func (*FakeClient) Update added in v0.1.9

func (c *FakeClient) Update(ctx context.Context, obj ctrlclient.Object, opts ...ctrlclient.UpdateOption) error

Jump to

Keyboard shortcuts

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