testing

package
v0.15.4 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: Apache-2.0 Imports: 52 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 MarkAddedToChannel

func MarkAddedToChannel(s *v1beta1.Subscription)

func MarkReferencesResolved

func MarkReferencesResolved(s *v1beta1.Subscription)

func MarkSubscriptionReady

func MarkSubscriptionReady(s *v1beta1.Subscription)

func NewChannel

func NewChannel(name, namespace string, o ...ChannelOption) *v1beta1.Channel

NewChannel creates a Channel with ChannelOptions

func NewFlowsParallel

func NewFlowsParallel(name, namespace string, popt ...FlowsParallelOption) *v1beta1.Parallel

NewFlowsParallel creates an Parallel with ParallelOptions.

func NewInMemoryChannel

func NewInMemoryChannel(name, namespace string, imcopt ...InMemoryChannelOption) *v1beta1.InMemoryChannel

NewInMemoryChannel creates a v1beta1.InMemoryChannel with InMemoryChannelOption .

func NewNamespace

func NewNamespace(name string, o ...NamespaceOption) *corev1.Namespace

NewNamespace creates a Namespace with NamespaceOptions

func NewScheme

func NewScheme() *runtime.Scheme

func NewSequence

func NewSequence(name, namespace string, popt ...SequenceOption) *v1beta1.Sequence

NewSequence creates an Sequence with SequenceOptions.

func NewSubscription

func NewSubscription(name, namespace string, so ...SubscriptionOption) *v1beta1.Subscription

NewSubscription creates a Subscription with SubscriptionOptions

func NewSubscriptionWithoutNamespace

func NewSubscriptionWithoutNamespace(name string, so ...SubscriptionOption) *v1beta1.Subscription

NewSubscriptionWithoutNamespace creates a Subscription with SubscriptionOptions but without a specific namespace

func NewTrigger

func NewTrigger(name, namespace, broker string, to ...TriggerOption) *v1beta1.Trigger

NewTrigger creates a Trigger with TriggerOptions.

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 WithBackingChannelReady

func WithBackingChannelReady(c *v1beta1.Channel)

func WithChannelDeleted

func WithChannelDeleted(c *v1beta1.Channel)

func WithFlowsParallelDeleted

func WithFlowsParallelDeleted(p *v1beta1.Parallel)

func WithInMemoryChannelDeleted

func WithInMemoryChannelDeleted(imc *v1beta1.InMemoryChannel)

func WithInitChannelConditions

func WithInitChannelConditions(c *v1beta1.Channel)

WithInitChannelConditions initializes the Channel's conditions.

func WithInitFlowsParallelConditions

func WithInitFlowsParallelConditions(p *v1beta1.Parallel)

func WithInitInMemoryChannelConditions

func WithInitInMemoryChannelConditions(imc *v1beta1.InMemoryChannel)

func WithInitSequenceConditions

func WithInitSequenceConditions(p *v1beta1.Sequence)

func WithInitSubscriptionConditions

func WithInitSubscriptionConditions(s *v1beta1.Subscription)

WithInitSubscriptionConditions initializes the Subscriptions's conditions.

func WithInitTriggerConditions

func WithInitTriggerConditions(t *v1beta1.Trigger)

WithInitTriggerConditions initializes the Triggers's conditions.

func WithNamespaceDeleted

func WithNamespaceDeleted(n *corev1.Namespace)

func WithSequenceDeleted

func WithSequenceDeleted(p *v1beta1.Sequence)

func WithSubscriptionDeleted

func WithSubscriptionDeleted(s *v1beta1.Subscription)

TODO: this can be a runtime object

func WithSubscriptionReady

func WithSubscriptionReady(s *v1beta1.Subscription)

func WithTriggerDeleted

func WithTriggerDeleted(t *v1beta1.Trigger)

TODO: this can be a runtime object

Types

type ChannelOption

type ChannelOption func(*v1beta1.Channel)

ChannelOption enables further configuration of a Channel.

func WithBackingChannelFailed

func WithBackingChannelFailed(reason, msg string) ChannelOption

func WithBackingChannelObjRef

func WithBackingChannelObjRef(objRef *duckv1.KReference) ChannelOption

func WithBackingChannelUnknown

func WithBackingChannelUnknown(reason, msg string) ChannelOption

func WithChannelAddress

func WithChannelAddress(hostname string) ChannelOption

func WithChannelGeneration

func WithChannelGeneration(gen int64) ChannelOption

func WithChannelNoAddress

func WithChannelNoAddress() ChannelOption

func WithChannelObservedGeneration

func WithChannelObservedGeneration(gen int64) ChannelOption

func WithChannelReadySubscriber

func WithChannelReadySubscriber(uid string) ChannelOption

func WithChannelReadySubscriberAndGeneration

func WithChannelReadySubscriberAndGeneration(uid string, observedGeneration int64) ChannelOption

func WithChannelSubscriberStatuses

func WithChannelSubscriberStatuses(subscriberStatuses []eventingduckv1beta1.SubscriberStatus) ChannelOption

func WithChannelTemplate

func WithChannelTemplate(typeMeta metav1.TypeMeta) ChannelOption

type Ctor

Ctor functions create a k8s controller with given params.

type FlowsParallelOption

type FlowsParallelOption func(*v1beta1.Parallel)

ParallelOption enables further configuration of a Parallel.

func WithFlowsParallelAddressableNotReady

func WithFlowsParallelAddressableNotReady(reason, message string) FlowsParallelOption

func WithFlowsParallelBranchStatuses

func WithFlowsParallelBranchStatuses(branchStatuses []v1beta1.ParallelBranchStatus) FlowsParallelOption

func WithFlowsParallelBranches

func WithFlowsParallelBranches(branches []v1beta1.ParallelBranch) FlowsParallelOption

func WithFlowsParallelChannelsNotReady

func WithFlowsParallelChannelsNotReady(reason, message string) FlowsParallelOption

func WithFlowsParallelGeneration

func WithFlowsParallelGeneration(gen int64) FlowsParallelOption

func WithFlowsParallelIngressChannelStatus

func WithFlowsParallelIngressChannelStatus(status v1beta1.ParallelChannelStatus) FlowsParallelOption

func WithFlowsParallelReply

func WithFlowsParallelReply(reply *duckv1.Destination) FlowsParallelOption

func WithFlowsParallelStatusObservedGeneration

func WithFlowsParallelStatusObservedGeneration(gen int64) FlowsParallelOption

func WithFlowsParallelSubscriptionsNotReady

func WithFlowsParallelSubscriptionsNotReady(reason, message string) FlowsParallelOption

type InMemoryChannelOption

type InMemoryChannelOption func(*v1beta1.InMemoryChannel)

InMemoryChannelOption enables further configuration of a v1beta1.InMemoryChannel.

func WithInMemoryChannelAddress

func WithInMemoryChannelAddress(a string) InMemoryChannelOption

func WithInMemoryChannelChannelServiceNotReady

func WithInMemoryChannelChannelServiceNotReady(reason, message string) InMemoryChannelOption

func WithInMemoryChannelChannelServiceReady

func WithInMemoryChannelChannelServiceReady() InMemoryChannelOption

func WithInMemoryChannelDeploymentFailed

func WithInMemoryChannelDeploymentFailed(reason, message string) InMemoryChannelOption

func WithInMemoryChannelDeploymentReady

func WithInMemoryChannelDeploymentReady() InMemoryChannelOption

func WithInMemoryChannelDeploymentUnknown

func WithInMemoryChannelDeploymentUnknown(reason, message string) InMemoryChannelOption

func WithInMemoryChannelEndpointsNotReady

func WithInMemoryChannelEndpointsNotReady(reason, message string) InMemoryChannelOption

func WithInMemoryChannelEndpointsReady

func WithInMemoryChannelEndpointsReady() InMemoryChannelOption

func WithInMemoryChannelGeneration

func WithInMemoryChannelGeneration(gen int64) InMemoryChannelOption

func WithInMemoryChannelReady

func WithInMemoryChannelReady(host string) InMemoryChannelOption

func WithInMemoryChannelReadySubscriber

func WithInMemoryChannelReadySubscriber(uid string) InMemoryChannelOption

func WithInMemoryChannelReadySubscriberAndGeneration

func WithInMemoryChannelReadySubscriberAndGeneration(uid string, observedGeneration int64) InMemoryChannelOption

func WithInMemoryChannelServiceReady

func WithInMemoryChannelServiceReady() InMemoryChannelOption

func WithInMemoryChannelServicetNotReady

func WithInMemoryChannelServicetNotReady(reason, message string) InMemoryChannelOption

func WithInMemoryChannelStatusObservedGeneration

func WithInMemoryChannelStatusObservedGeneration(gen int64) InMemoryChannelOption

func WithInMemoryChannelStatusSubscribers

func WithInMemoryChannelStatusSubscribers(subscriberStatuses []duckv1beta1.SubscriberStatus) InMemoryChannelOption

func WithInMemoryChannelSubscribers

func WithInMemoryChannelSubscribers(subscribers []duckv1beta1.SubscriberSpec) InMemoryChannelOption

func WithInMemoryScopeAnnotation

func WithInMemoryScopeAnnotation(value string) InMemoryChannelOption

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) GetApiServerSourceLister

func (l *Listers) GetApiServerSourceLister() sourcelisters.ApiServerSourceLister

func (*Listers) GetApiServerSourceV1alpha2Lister

func (l *Listers) GetApiServerSourceV1alpha2Lister() sourcev1alpha2listers.ApiServerSourceLister

func (*Listers) GetBrokerLister

func (l *Listers) GetBrokerLister() eventinglisters.BrokerLister

func (*Listers) GetConfigMapLister

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

func (*Listers) GetConfigMapPropagationLister

func (l *Listers) GetConfigMapPropagationLister() configslisters.ConfigMapPropagationLister

func (*Listers) GetContainerSourceLister

func (l *Listers) GetContainerSourceLister() sourcev1alpha2listers.ContainerSourceLister

func (*Listers) GetCustomResourceDefinitionLister

func (l *Listers) GetCustomResourceDefinitionLister() apiextensionsv1beta1listers.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() eventinglisters.EventTypeLister

func (*Listers) GetEventingObjects

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

func (*Listers) GetInMemoryChannelLister

func (l *Listers) GetInMemoryChannelLister() messaginglistersv1beta1.InMemoryChannelLister

func (*Listers) GetK8sServiceLister

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

func (*Listers) GetKubeObjects

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

func (*Listers) GetMessagingChannelLister

func (l *Listers) GetMessagingChannelLister() messaginglistersv1beta1.ChannelLister

func (*Listers) GetNamespaceLister

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

func (*Listers) GetParallelLister

func (l *Listers) GetParallelLister() flowslisters.ParallelLister

func (*Listers) GetPingSourceLister

func (l *Listers) GetPingSourceLister() sourcelisters.PingSourceLister

func (*Listers) GetPingSourceV1alpha2Lister

func (l *Listers) GetPingSourceV1alpha2Lister() sourcev1alpha2listers.PingSourceLister

func (*Listers) GetRoleBindingLister

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

func (*Listers) GetSequenceLister

func (l *Listers) GetSequenceLister() flowslisters.SequenceLister

func (*Listers) GetServiceAccountLister

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

func (*Listers) GetServiceLister

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

func (*Listers) GetSinkBindingLister

func (l *Listers) GetSinkBindingLister() sourcelisters.SinkBindingLister

func (*Listers) GetSinkBindingV1alpha2Lister

func (l *Listers) GetSinkBindingV1alpha2Lister() sourcev1alpha2listers.SinkBindingLister

func (*Listers) GetSubscriberObjects

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

func (*Listers) GetSubscriptionLister

func (l *Listers) GetSubscriptionLister() messaginglistersv1beta1.SubscriptionLister

func (*Listers) GetTriggerLister

func (l *Listers) GetTriggerLister() eventinglisters.TriggerLister

func (*Listers) GetV1Beta1BrokerLister

func (l *Listers) GetV1Beta1BrokerLister() eventingv1beta1listers.BrokerLister

func (*Listers) GetV1Beta1TriggerLister

func (l *Listers) GetV1Beta1TriggerLister() eventingv1beta1listers.TriggerLister

type NamespaceOption

type NamespaceOption func(*corev1.Namespace)

NamespaceOption enables further configuration of a Namespace.

func WithNamespaceLabeled

func WithNamespaceLabeled(labels map[string]string) NamespaceOption

type SequenceOption

type SequenceOption func(*v1beta1.Sequence)

SequenceOption enables further configuration of a Sequence.

func WithSequenceAddressableNotReady

func WithSequenceAddressableNotReady(reason, message string) SequenceOption

func WithSequenceChannelStatuses

func WithSequenceChannelStatuses(channelStatuses []v1beta1.SequenceChannelStatus) SequenceOption

func WithSequenceChannelsNotReady

func WithSequenceChannelsNotReady(reason, message string) SequenceOption

func WithSequenceGeneration

func WithSequenceGeneration(gen int64) SequenceOption

func WithSequenceReply

func WithSequenceReply(reply *duckv1.Destination) SequenceOption

func WithSequenceStatusObservedGeneration

func WithSequenceStatusObservedGeneration(gen int64) SequenceOption

func WithSequenceSteps

func WithSequenceSteps(steps []v1beta1.SequenceStep) SequenceOption

func WithSequenceSubscriptionStatuses

func WithSequenceSubscriptionStatuses(subscriptionStatuses []v1beta1.SequenceSubscriptionStatus) SequenceOption

func WithSequenceSubscriptionsNotReady

func WithSequenceSubscriptionsNotReady(reason, message string) SequenceOption

type SubscriptionOption

type SubscriptionOption func(*v1beta1.Subscription)

SubscriptionOption enables further configuration of a Subscription.

func MarkNotAddedToChannel

func MarkNotAddedToChannel(reason, msg string) SubscriptionOption

func WithSubscriptionChannel

func WithSubscriptionChannel(gvk metav1.GroupVersionKind, name string) SubscriptionOption

func WithSubscriptionDeadLetterSinkURI

func WithSubscriptionDeadLetterSinkURI(uri *apis.URL) SubscriptionOption

func WithSubscriptionDeliveryRef

func WithSubscriptionDeliveryRef(gvk metav1.GroupVersionKind, name, namespace string) SubscriptionOption

func WithSubscriptionFinalizers

func WithSubscriptionFinalizers(finalizers ...string) SubscriptionOption

func WithSubscriptionGenerateName

func WithSubscriptionGenerateName(generateName string) SubscriptionOption

func WithSubscriptionGeneration

func WithSubscriptionGeneration(gen int64) SubscriptionOption

func WithSubscriptionLabels

func WithSubscriptionLabels(labels map[string]string) SubscriptionOption

func WithSubscriptionOwnerReferences

func WithSubscriptionOwnerReferences(ownerReferences []metav1.OwnerReference) SubscriptionOption

func WithSubscriptionPhysicalSubscriptionReply

func WithSubscriptionPhysicalSubscriptionReply(uri *apis.URL) SubscriptionOption

func WithSubscriptionPhysicalSubscriptionSubscriber

func WithSubscriptionPhysicalSubscriptionSubscriber(uri *apis.URL) SubscriptionOption

func WithSubscriptionReferencesNotResolved

func WithSubscriptionReferencesNotResolved(reason, msg string) SubscriptionOption

func WithSubscriptionReferencesResolvedUnknown

func WithSubscriptionReferencesResolvedUnknown(reason, msg string) SubscriptionOption

func WithSubscriptionReply

func WithSubscriptionReply(gvk metav1.GroupVersionKind, name, namespace string) SubscriptionOption

func WithSubscriptionStatusObservedGeneration

func WithSubscriptionStatusObservedGeneration(gen int64) SubscriptionOption

func WithSubscriptionSubscriberRef

func WithSubscriptionSubscriberRef(gvk metav1.GroupVersionKind, name, namespace string) SubscriptionOption

func WithSubscriptionUID

func WithSubscriptionUID(uid types.UID) SubscriptionOption

type TriggerOption

type TriggerOption func(*v1beta1.Trigger)

TriggerOption enables further configuration of a Trigger.

func WithDependencyAnnotation

func WithDependencyAnnotation(dependencyAnnotation string) TriggerOption

func WithInjectionAnnotation

func WithInjectionAnnotation(injectionAnnotation string) TriggerOption

func WithTriggerBrokerFailed

func WithTriggerBrokerFailed(reason, message string) TriggerOption

WithTriggerBrokerFailed marks the Broker as failed

func WithTriggerBrokerReady

func WithTriggerBrokerReady() TriggerOption

WithTriggerBrokerReady initializes the Triggers's conditions.

func WithTriggerBrokerUnknown

func WithTriggerBrokerUnknown(reason, message string) TriggerOption

WithTriggerBrokerUnknown marks the Broker as unknown

func WithTriggerDependencyFailed

func WithTriggerDependencyFailed(reason, message string) TriggerOption

func WithTriggerDependencyReady

func WithTriggerDependencyReady() TriggerOption

func WithTriggerDependencyUnknown

func WithTriggerDependencyUnknown(reason, message string) TriggerOption

func WithTriggerGeneration

func WithTriggerGeneration(gen int64) TriggerOption

func WithTriggerNotSubscribed

func WithTriggerNotSubscribed(reason, message string) TriggerOption

func WithTriggerStatusObservedGeneration

func WithTriggerStatusObservedGeneration(gen int64) TriggerOption

func WithTriggerStatusSubscriberURI

func WithTriggerStatusSubscriberURI(uri string) TriggerOption

func WithTriggerSubscribed

func WithTriggerSubscribed() TriggerOption

func WithTriggerSubscribedUnknown

func WithTriggerSubscribedUnknown(reason, message string) TriggerOption

func WithTriggerSubscriberRef

func WithTriggerSubscriberRef(gvk metav1.GroupVersionKind, name, namespace string) TriggerOption

func WithTriggerSubscriberRefAndURIReference

func WithTriggerSubscriberRefAndURIReference(gvk metav1.GroupVersionKind, name, namespace string, rawuri string) TriggerOption

func WithTriggerSubscriberResolvedFailed

func WithTriggerSubscriberResolvedFailed(reason, message string) TriggerOption

func WithTriggerSubscriberResolvedSucceeded

func WithTriggerSubscriberResolvedSucceeded() TriggerOption

func WithTriggerSubscriberResolvedUnknown

func WithTriggerSubscriberResolvedUnknown(reason, message string) TriggerOption

func WithTriggerSubscriberURI

func WithTriggerSubscriberURI(rawurl string) TriggerOption

func WithTriggerSubscriptionNotConfigured

func WithTriggerSubscriptionNotConfigured() TriggerOption

func WithTriggerUID

func WithTriggerUID(uid string) TriggerOption

Jump to

Keyboard shortcuts

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