testing

package
v0.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 3 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
	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)
	// 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

Jump to

Keyboard shortcuts

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