testing

package
v0.29.4 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeFactory

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

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

func NewEventType added in v0.16.0

func NewEventType(name, namespace string, o ...EventTypeOption) *v1beta1.EventType

NewEventType creates a EventType with EventTypeOptions.

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.

func WithEventTypeBrokerDoesNotExist added in v0.16.0

func WithEventTypeBrokerDoesNotExist(et *v1beta1.EventType)

WithEventTypeBrokerNotFound calls .Status.MarkFilterFailed on the EventType.

func WithEventTypeBrokerExists added in v0.16.0

func WithEventTypeBrokerExists(et *v1beta1.EventType)

WithEventTypeBrokerExists calls .Status.MarkBrokerExists on the EventType.

func WithEventTypeBrokerReady added in v0.16.0

func WithEventTypeBrokerReady(et *v1beta1.EventType)

WithEventTypeBrokerReady calls .Status.MarkBrokerReady on the EventType.

func WithEventTypeDeletionTimestamp added in v0.16.0

func WithEventTypeDeletionTimestamp(et *v1beta1.EventType)

func WithInitEventTypeConditions added in v0.16.0

func WithInitEventTypeConditions(et *v1beta1.EventType)

WithInitEventTypeConditions initializes the EventType's conditions.

Types

type Ctor

Ctor functions create a k8s controller with given params.

type EventTypeOption added in v0.16.0

type EventTypeOption func(*v1beta1.EventType)

EventTypeOption enables further configuration of an EventType.

func WithEventTypeBroker added in v0.16.0

func WithEventTypeBroker(broker string) EventTypeOption

func WithEventTypeBrokerFailed added in v0.16.0

func WithEventTypeBrokerFailed(reason, message string) EventTypeOption

func WithEventTypeBrokerUnknown added in v0.16.0

func WithEventTypeBrokerUnknown(reason, message string) EventTypeOption

func WithEventTypeDescription added in v0.16.0

func WithEventTypeDescription(description string) EventTypeOption

func WithEventTypeLabels added in v0.16.0

func WithEventTypeLabels(labels map[string]string) EventTypeOption

func WithEventTypeOwnerReference added in v0.16.0

func WithEventTypeOwnerReference(ownerRef metav1.OwnerReference) EventTypeOption

func WithEventTypeSource added in v0.16.0

func WithEventTypeSource(source *apis.URL) EventTypeOption

func WithEventTypeType added in v0.16.0

func WithEventTypeType(t string) EventTypeOption

type Listers

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

func NewListers

func NewListers(objs []runtime.Object) Listers

func (*Listers) GetAPIExtensionObjects added in v0.22.0

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

func (*Listers) GetAllObjects

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

func (*Listers) GetConfigMapLister

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

func (*Listers) GetCustomResourceDefinitionLister

func (l *Listers) GetCustomResourceDefinitionLister() apiextensionsv1listers.CustomResourceDefinitionLister

func (*Listers) GetDeploymentLister

func (l *Listers) GetDeploymentLister() appsv1listers.DeploymentLister

func (*Listers) GetEndpointsLister

func (l *Listers) GetEndpointsLister() corev1listers.EndpointsLister

func (*Listers) GetEventTypeLister

func (l *Listers) GetEventTypeLister() eventingv1beta1listers.EventTypeLister

func (*Listers) GetEventingObjects

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

func (*Listers) GetK8sServiceLister

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

func (*Listers) GetKubeObjects

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

func (*Listers) GetNamespaceLister

func (l *Listers) GetNamespaceLister() corev1listers.NamespaceLister

func (*Listers) GetRoleBindingLister

func (l *Listers) GetRoleBindingLister() rbacv1listers.RoleBindingLister

func (*Listers) GetServiceAccountLister

func (l *Listers) GetServiceAccountLister() corev1listers.ServiceAccountLister

func (*Listers) GetServiceLister

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

func (*Listers) GetSubscriberObjects

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

Jump to

Keyboard shortcuts

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