mocks

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

type MockClient struct{ mock.Mock }

func NewMockClient

func NewMockClient() *MockClient

NewMockClient returns a MockClient that is a mocked sigs.k8s.io/controller-runtime/pkg/client and can be used to mock calls to the Kubernetes API during unit tests

func (*MockClient) Create

func (m *MockClient) Create(ctx context.Context, obj ctrlClient.Object, opts ...ctrlClient.CreateOption) error

func (*MockClient) Delete

func (m *MockClient) Delete(ctx context.Context, obj ctrlClient.Object, opts ...ctrlClient.DeleteOption) error

func (*MockClient) DeleteAllOf

func (m *MockClient) DeleteAllOf(ctx context.Context, obj ctrlClient.Object, opts ...ctrlClient.DeleteAllOfOption) error

func (*MockClient) Get

func (*MockClient) GroupVersionKindFor

func (m *MockClient) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error)

func (*MockClient) IsObjectNamespaced

func (m *MockClient) IsObjectNamespaced(obj runtime.Object) (bool, error)

func (*MockClient) List

func (*MockClient) Patch

func (*MockClient) RESTMapper

func (m *MockClient) RESTMapper() meta.RESTMapper

func (*MockClient) Scheme

func (m *MockClient) Scheme() *runtime.Scheme

func (*MockClient) Status

func (*MockClient) SubResource

func (m *MockClient) SubResource(subResource string) ctrlClient.SubResourceClient

func (*MockClient) Update

func (m *MockClient) 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