testing

package
v0.44.2 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 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

func NewEventType(name, namespace string, o ...EventTypeOption) *v1beta3.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 WithEventTypeDeletionTimestamp

func WithEventTypeDeletionTimestamp(et *v1beta3.EventType)

func WithEventTypeResourceDoesNotExist

func WithEventTypeResourceDoesNotExist(et *v1beta3.EventType)

WithEventTypeResourceDoesNotExist calls .Status.MarkFilterFailed on the EventType.

func WithEventTypeResourceExists

func WithEventTypeResourceExists(et *v1beta3.EventType)

WithEventTypeResourceExists calls .Status.MarkReferenceExists on the EventType.

func WithInitEventTypeConditions

func WithInitEventTypeConditions(et *v1beta3.EventType)

WithInitEventTypeConditions initializes the EventType's conditions.

Types

type Ctor

Ctor functions create a k8s controller with given params.

type EventTypeOption

type EventTypeOption func(*v1beta3.EventType)

EventTypeOption enables further configuration of an EventType.

func WithEventTypeDescription

func WithEventTypeDescription(description string) EventTypeOption

func WithEventTypeId

func WithEventTypeId() EventTypeOption

func WithEventTypeLabels

func WithEventTypeLabels(labels map[string]string) EventTypeOption

func WithEventTypeOwnerReference

func WithEventTypeOwnerReference(ownerRef metav1.OwnerReference) EventTypeOption

func WithEventTypeReference

func WithEventTypeReference(ref *duckv1.KReference) EventTypeOption

func WithEventTypeSource

func WithEventTypeSource(source *apis.URL) EventTypeOption

func WithEventTypeSpecVersion

func WithEventTypeSpecVersion(specVersion string) EventTypeOption

func WithEventTypeType

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

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() eventingv1beta3listers.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