testing

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeFactory

func MakeFactory(ctor Ctor, logger *zap.SugaredLogger) Factory

MakeFactory creates a reconciler factory with fake clients and controller created by `ctor`.

func NewScheme

func NewScheme() *runtime.Scheme

func ToUnstructured

func ToUnstructured(t *testing.T, objs []runtime.Object) (us []runtime.Object)

ToUnstructured takes a list of k8s resources and converts them to Unstructured objects. We must pass objects as Unstructured to the dynamic client fake, or it won't handle them properly.

Types

type Ctor

type Ctor func(context.Context, *Listers, *TableRow, configmap.Watcher) controller.Reconciler

Ctor functions create a k8s controller with given params.

type Listers

type Listers struct {
	// contains filtered or unexported fields
}

func NewListers

func NewListers(objs []runtime.Object) Listers

func (*Listers) GetAllObjects

func (l *Listers) GetAllObjects() []runtime.Object

func (*Listers) GetConfigMapLister

func (l *Listers) GetConfigMapLister() corev1listers.ConfigMapLister

func (*Listers) GetDestinationRuleLister

func (l *Listers) GetDestinationRuleLister() networkinglisters.DestinationRuleLister

func (*Listers) GetIstioObjects

func (l *Listers) GetIstioObjects() []runtime.Object

func (*Listers) GetKubeObjects

func (l *Listers) GetKubeObjects() []runtime.Object

func (*Listers) GetServiceLister

func (l *Listers) GetServiceLister() corev1listers.ServiceLister

Jump to

Keyboard shortcuts

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