testutil

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfigMap

func NewConfigMap() *corev1.ConfigMap

func NewSecret

func NewSecret() *corev1.Secret

func NewTestSchemeWithCoreV1

func NewTestSchemeWithCoreV1() *runtime.Scheme

func NewTestSchemeWithCoreV1Alpha1

func NewTestSchemeWithCoreV1Alpha1() *runtime.Scheme

func NewTestSchemeWithCoreV1AppsV1

func NewTestSchemeWithCoreV1AppsV1() *runtime.Scheme

Types

type CtrlClient

type CtrlClient struct {
	mock.Mock

	StatusMock *CtrlStatusClient
}

CtrlClient is a mock for the controller-runtime client interface.

func NewClient

func NewClient() *CtrlClient

func (*CtrlClient) Create

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

func (*CtrlClient) Delete

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

func (*CtrlClient) DeleteAllOf

func (c *CtrlClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error

func (*CtrlClient) Get

func (*CtrlClient) List

func (c *CtrlClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error

func (*CtrlClient) Patch

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

func (*CtrlClient) RESTMapper

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

func (*CtrlClient) Scheme

func (c *CtrlClient) Scheme() *runtime.Scheme

func (*CtrlClient) Status

func (c *CtrlClient) Status() client.StatusWriter

func (*CtrlClient) SubResource added in v1.2.0

func (c *CtrlClient) SubResource(string) client.SubResourceClient

func (*CtrlClient) Update

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

type CtrlStatusClient

type CtrlStatusClient struct {
	mock.Mock
}

func (*CtrlStatusClient) Create added in v1.2.0

func (c *CtrlStatusClient) Create(ctx context.Context, obj client.Object, subResource client.Object, opts ...client.SubResourceCreateOption) error

func (*CtrlStatusClient) Patch

func (*CtrlStatusClient) Update

type DynamicClient

type DynamicClient struct {
	mock.Mock
}

func NewDynamicClient

func NewDynamicClient() *DynamicClient

func (*DynamicClient) Resource

type DynamicClientNamespaceableResourceInterface

type DynamicClientNamespaceableResourceInterface struct {
	mock.Mock
}

func (*DynamicClientNamespaceableResourceInterface) Apply

func (*DynamicClientNamespaceableResourceInterface) ApplyStatus

func (*DynamicClientNamespaceableResourceInterface) Create

func (*DynamicClientNamespaceableResourceInterface) Delete

func (dc *DynamicClientNamespaceableResourceInterface) Delete(
	ctx context.Context, name string,
	options metav1.DeleteOptions, subresources ...string,
) error

func (*DynamicClientNamespaceableResourceInterface) DeleteCollection

func (dc *DynamicClientNamespaceableResourceInterface) DeleteCollection(
	ctx context.Context, options metav1.DeleteOptions,
	listOptions metav1.ListOptions,
) error

func (*DynamicClientNamespaceableResourceInterface) Get

func (*DynamicClientNamespaceableResourceInterface) List

func (*DynamicClientNamespaceableResourceInterface) Namespace

func (*DynamicClientNamespaceableResourceInterface) Patch

func (*DynamicClientNamespaceableResourceInterface) Update

func (*DynamicClientNamespaceableResourceInterface) UpdateStatus

func (*DynamicClientNamespaceableResourceInterface) Watch

type DynamicClientResourceInterface

type DynamicClientResourceInterface struct {
	mock.Mock
}

func (*DynamicClientResourceInterface) Apply

func (*DynamicClientResourceInterface) ApplyStatus

func (*DynamicClientResourceInterface) Create

func (*DynamicClientResourceInterface) Delete

func (dc *DynamicClientResourceInterface) Delete(
	ctx context.Context, name string,
	options metav1.DeleteOptions, subresources ...string,
) error

func (*DynamicClientResourceInterface) DeleteCollection

func (dc *DynamicClientResourceInterface) DeleteCollection(
	ctx context.Context, options metav1.DeleteOptions,
	listOptions metav1.ListOptions,
) error

func (*DynamicClientResourceInterface) Get

func (dc *DynamicClientResourceInterface) Get(
	ctx context.Context, name string,
	options metav1.GetOptions, subresources ...string,
) (*unstructured.Unstructured, error)

func (*DynamicClientResourceInterface) List

func (*DynamicClientResourceInterface) Patch

func (dc *DynamicClientResourceInterface) Patch(
	ctx context.Context, name string,
	pt types.PatchType, data []byte,
	options metav1.PatchOptions, subresources ...string,
) (*unstructured.Unstructured, error)

func (*DynamicClientResourceInterface) Update

func (*DynamicClientResourceInterface) UpdateStatus

func (*DynamicClientResourceInterface) Watch

type InMemoryRegistry added in v1.3.0

type InMemoryRegistry struct {
	RoundTripper http.RoundTripper
	Handler      http.Handler
	CraneOpt     crane.Option
}

func NewInMemoryRegistry added in v1.3.0

func NewInMemoryRegistry() *InMemoryRegistry

type RateLimitingQueue

type RateLimitingQueue struct {
	mock.Mock
}

func (*RateLimitingQueue) Add

func (q *RateLimitingQueue) Add(item interface{})

func (*RateLimitingQueue) AddAfter

func (q *RateLimitingQueue) AddAfter(item interface{}, duration time.Duration)

func (*RateLimitingQueue) AddRateLimited

func (q *RateLimitingQueue) AddRateLimited(item interface{})

func (*RateLimitingQueue) Done

func (q *RateLimitingQueue) Done(item interface{})

func (*RateLimitingQueue) Forget

func (q *RateLimitingQueue) Forget(item interface{})

func (*RateLimitingQueue) Get

func (q *RateLimitingQueue) Get() (item interface{}, shutdown bool)

func (*RateLimitingQueue) Len

func (q *RateLimitingQueue) Len() int

func (*RateLimitingQueue) NumRequeues

func (q *RateLimitingQueue) NumRequeues(item interface{}) int

func (*RateLimitingQueue) ShutDown

func (q *RateLimitingQueue) ShutDown()

func (*RateLimitingQueue) ShutDownWithDrain

func (q *RateLimitingQueue) ShutDownWithDrain()

func (*RateLimitingQueue) ShuttingDown

func (q *RateLimitingQueue) ShuttingDown() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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