testing

package
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeFactory added in v0.38.0

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.38.0

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

NewEventType creates a EventType with EventTypeOptions.

func NewPingSource

func NewPingSource(name, namespace string, o ...PingSourceOption) *v1beta2.PingSource

NewPingSource creates a PingSource with PingSourceOption.

func NewScheme added in v0.38.0

func NewScheme() *runtime.Scheme

func ToUnstructured added in v0.38.0

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 added in v0.38.0

func WithEventTypeDeletionTimestamp(et *v1beta2.EventType)

func WithEventTypeResourceDoesNotExist added in v0.38.0

func WithEventTypeResourceDoesNotExist(et *v1beta2.EventType)

WithEventTypeResourceDoesNotExist calls .Status.MarkFilterFailed on the EventType.

func WithEventTypeResourceExists added in v0.38.0

func WithEventTypeResourceExists(et *v1beta2.EventType)

WithEventTypeResourceExists calls .Status.MarkReferenceExists on the EventType.

func WithInitEventTypeConditions added in v0.38.0

func WithInitEventTypeConditions(et *v1beta2.EventType)

WithInitEventTypeConditions initializes the EventType's conditions.

func WithInitPingSourceConditions

func WithInitPingSourceConditions(s *v1beta2.PingSource)

func WithPingSourceCloudEventAttributes

func WithPingSourceCloudEventAttributes(s *v1beta2.PingSource)

func WithPingSourceDeleted

func WithPingSourceDeleted(c *v1beta2.PingSource)

func WithPingSourceDeployed

func WithPingSourceDeployed(s *v1beta2.PingSource)

func WithPingSourceSinkNotFound

func WithPingSourceSinkNotFound(s *v1beta2.PingSource)

Types

type Ctor added in v0.38.0

Ctor functions create a k8s controller with given params.

type EventTypeOption added in v0.38.0

type EventTypeOption func(*v1beta2.EventType)

EventTypeOption enables further configuration of an EventType.

func WithEventTypeDescription added in v0.38.0

func WithEventTypeDescription(description string) EventTypeOption

func WithEventTypeLabels added in v0.38.0

func WithEventTypeLabels(labels map[string]string) EventTypeOption

func WithEventTypeOwnerReference added in v0.38.0

func WithEventTypeOwnerReference(ownerRef metav1.OwnerReference) EventTypeOption

func WithEventTypeReference added in v0.38.0

func WithEventTypeReference(ref *duckv1.KReference) EventTypeOption

func WithEventTypeSource added in v0.38.0

func WithEventTypeSource(source *apis.URL) EventTypeOption

func WithEventTypeType added in v0.38.0

func WithEventTypeType(t string) EventTypeOption

type Listers added in v0.38.0

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

func NewListers added in v0.38.0

func NewListers(objs []runtime.Object) Listers

func (*Listers) GetAPIExtensionObjects added in v0.38.0

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

func (*Listers) GetAllObjects added in v0.38.0

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

func (*Listers) GetConfigMapLister added in v0.38.0

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

func (*Listers) GetCustomResourceDefinitionLister added in v0.38.0

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

func (*Listers) GetDeploymentLister added in v0.38.0

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

func (*Listers) GetEndpointsLister added in v0.38.0

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

func (*Listers) GetEventTypeLister added in v0.38.0

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

func (*Listers) GetEventingObjects added in v0.38.0

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

func (*Listers) GetK8sServiceLister added in v0.38.0

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

func (*Listers) GetKubeObjects added in v0.38.0

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

func (*Listers) GetNamespaceLister added in v0.38.0

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

func (*Listers) GetRoleBindingLister added in v0.38.0

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

func (*Listers) GetServiceAccountLister added in v0.38.0

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

func (*Listers) GetServiceLister added in v0.38.0

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

func (*Listers) GetSubscriberObjects added in v0.38.0

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

type PingSourceOption

type PingSourceOption func(*v1beta2.PingSource)

PingSourceOption enables further configuration of a CronJob.

func WithPingSource

func WithPingSource(uid string) PingSourceOption

func WithPingSourceFinalizers

func WithPingSourceFinalizers(finalizers ...string) PingSourceOption

func WithPingSourceObjectMetaGeneration

func WithPingSourceObjectMetaGeneration(generation int64) PingSourceOption

func WithPingSourceSink

func WithPingSourceSink(uri *apis.URL) PingSourceOption

func WithPingSourceSpec

func WithPingSourceSpec(spec v1beta2.PingSourceSpec) PingSourceOption

func WithPingSourceStatusObservedGeneration

func WithPingSourceStatusObservedGeneration(generation int64) PingSourceOption

Jump to

Keyboard shortcuts

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