testing

package
v0.22.0-alpha.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultTestTargetNamespace     = "test"
	DefaultTestCurrentNamespace    = "vcluster"
	DefaultTestVClusterName        = "vcluster"
	DefaultTestVClusterServiceName = "vcluster"
)

Variables

This section is empty.

Functions

func NewFakeConfig added in v0.21.0

func NewFakeConfig() *config.VirtualClusterConfig

func NewFakeManager added in v0.21.0

func NewFakeManager(client *FakeIndexClient) ctrl.Manager

func NewFakeMapper

func NewFakeMapper(gvk schema.GroupVersionKind) synccontext.Mapper

func NewFakeRESTMapper added in v0.21.0

func NewFakeRESTMapper(scheme *runtime.Scheme) meta.RESTMapper

NewFakeRESTMapper creates a new fake mapper

Types

type FakeEventRecorder

type FakeEventRecorder struct {
}

func (*FakeEventRecorder) AnnotatedEventf

func (f *FakeEventRecorder) AnnotatedEventf(runtime.Object, map[string]string, string, string, string, ...interface{})

func (*FakeEventRecorder) Event

func (*FakeEventRecorder) Eventf

func (f *FakeEventRecorder) Eventf(runtime.Object, string, string, string, ...interface{})

type FakeIndexClient

type FakeIndexClient struct {
	client.Client
	// contains filtered or unexported fields
}

func NewFakeClient

func NewFakeClient(scheme *runtime.Scheme, objs ...runtime.Object) *FakeIndexClient

NewFakeClient creates a new fake client for the standard schema

func (*FakeIndexClient) AddMapping added in v0.21.0

func (fc *FakeIndexClient) AddMapping(kind schema.GroupVersionKind, scope meta.RESTScope)

func (*FakeIndexClient) AddSpecificMapping added in v0.21.0

func (fc *FakeIndexClient) AddSpecificMapping(kind schema.GroupVersionKind, plural, singular schema.GroupVersionResource, scope meta.RESTScope)

func (*FakeIndexClient) Create

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

func (*FakeIndexClient) Delete

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

func (*FakeIndexClient) DeleteAllOf

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

func (*FakeIndexClient) Get

func (*FakeIndexClient) IndexField

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

func (*FakeIndexClient) List

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

func (*FakeIndexClient) Patch

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

func (*FakeIndexClient) Update

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

Jump to

Keyboard shortcuts

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