testing

package
v0.17.6 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: Apache-2.0 Imports: 48 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeFactory added in v0.17.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 NewBroker added in v0.17.0

func NewBroker(name, namespace string, o ...BrokerOption) *v1.Broker

NewBroker creates a Broker with BrokerOptions.

func NewConfigMap added in v0.17.0

func NewConfigMap(name, namespace string, o ...ConfigMapOption) *v1.ConfigMap

NewConfigMap creates a new ConfigMap.

func NewEndpoints added in v0.17.0

func NewEndpoints(name, namespace string, so ...EndpointsOption) *corev1.Endpoints

NewEndpoints creates a Endpoints with EndpointsOptions

func NewFlowsParallel

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

NewFlowsParallel creates an Parallel with ParallelOptions.

func NewInMemoryChannel added in v0.17.0

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

NewInMemoryChannel creates a v1.InMemoryChannel with InMemoryChannelOption .

func NewScheme added in v0.17.0

func NewScheme() *runtime.Scheme

func NewSequence

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

NewSequence creates an Sequence with SequenceOptions.

func NewTrigger added in v0.17.0

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

NewTrigger creates a Trigger with TriggerOptions.

func NewUnstructured added in v0.17.0

func NewUnstructured(gvk metav1.GroupVersionKind, name, namespace string, uo ...UnstructuredOption) *unstructured.Unstructured

NewUnstructured creates a unstructured.Unstructured with UnstructuredOption

func ToUnstructured added in v0.17.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 WithBrokerDeletionTimestamp added in v0.17.0

func WithBrokerDeletionTimestamp(b *v1.Broker)

func WithBrokerReady added in v0.17.0

func WithBrokerReady(b *v1.Broker)

WithBrokerReady sets .Status to ready.

func WithDeprecatedStatus added in v0.17.0

func WithDeprecatedStatus(b *v1.Broker)

func WithFlowsParallelDeleted

func WithFlowsParallelDeleted(p *flowsv1.Parallel)

func WithInMemoryChannelDeleted added in v0.17.0

func WithInMemoryChannelDeleted(imc *v1.InMemoryChannel)

func WithInMemoryChannelDuckAnnotationV1Beta1 added in v0.17.0

func WithInMemoryChannelDuckAnnotationV1Beta1(imc *v1.InMemoryChannel)

func WithInitBrokerConditions added in v0.17.0

func WithInitBrokerConditions(b *v1.Broker)

WithInitBrokerConditions initializes the Broker's conditions.

func WithInitFlowsParallelConditions

func WithInitFlowsParallelConditions(p *flowsv1.Parallel)

func WithInitInMemoryChannelConditions added in v0.17.0

func WithInitInMemoryChannelConditions(imc *v1.InMemoryChannel)

func WithInitSequenceConditions

func WithInitSequenceConditions(p *flowsv1.Sequence)

func WithInitTriggerConditions added in v0.17.0

func WithInitTriggerConditions(t *v1.Trigger)

WithInitTriggerConditions initializes the Triggers's conditions.

func WithSequenceDeleted

func WithSequenceDeleted(p *flowsv1.Sequence)

func WithTriggerDeleted added in v0.17.0

func WithTriggerDeleted(t *v1.Trigger)

Types

type BrokerOption added in v0.17.0

type BrokerOption func(*v1.Broker)

BrokerOption enables further configuration of a Broker.

func WithBrokerAddress added in v0.17.0

func WithBrokerAddress(address string) BrokerOption

WithBrokerAddress sets the Broker's address.

func WithBrokerAddressURI added in v0.17.0

func WithBrokerAddressURI(uri *apis.URL) BrokerOption

WithBrokerAddressURI sets the Broker's address as URI.

func WithBrokerClass added in v0.17.0

func WithBrokerClass(bc string) BrokerOption

func WithBrokerConfig added in v0.17.0

func WithBrokerConfig(config *duckv1.KReference) BrokerOption

WithBrokerChannel sets the Broker's ChannelTemplateSpec to the specified CRD.

func WithBrokerFinalizers added in v0.17.0

func WithBrokerFinalizers(finalizers ...string) BrokerOption

func WithBrokerGeneration added in v0.17.0

func WithBrokerGeneration(gen int64) BrokerOption

func WithBrokerResourceVersion added in v0.17.0

func WithBrokerResourceVersion(rv string) BrokerOption

func WithBrokerStatusObservedGeneration added in v0.17.0

func WithBrokerStatusObservedGeneration(gen int64) BrokerOption

func WithChannelAPIVersionAnnotation added in v0.17.0

func WithChannelAPIVersionAnnotation(apiVersion string) BrokerOption

func WithChannelAddressAnnotation added in v0.17.0

func WithChannelAddressAnnotation(address string) BrokerOption

func WithChannelKindAnnotation added in v0.17.0

func WithChannelKindAnnotation(kind string) BrokerOption

func WithChannelNameAnnotation added in v0.17.0

func WithChannelNameAnnotation(name string) BrokerOption

func WithFilterAvailable added in v0.17.0

func WithFilterAvailable() BrokerOption

func WithFilterFailed added in v0.17.0

func WithFilterFailed(reason, msg string) BrokerOption

WithFilterFailed calls .Status.MarkFilterFailed on the Broker.

func WithIngressAvailable added in v0.17.0

func WithIngressAvailable() BrokerOption

func WithIngressFailed added in v0.17.0

func WithIngressFailed(reason, msg string) BrokerOption

WithIngressFailed calls .Status.MarkIngressFailed on the Broker.

func WithTriggerChannelFailed added in v0.17.0

func WithTriggerChannelFailed(reason, msg string) BrokerOption

WithTriggerChannelFailed calls .Status.MarkTriggerChannelFailed on the Broker.

func WithTriggerChannelReady added in v0.17.0

func WithTriggerChannelReady() BrokerOption

WithTriggerChannelReady calls .Status.PropagateTriggerChannelReadiness on the Broker.

type ConfigMapOption added in v0.17.0

type ConfigMapOption func(*v1.ConfigMap)

ConfigMapOption enables further configuration of a ConfigMap.

func WithConfigMapData added in v0.17.0

func WithConfigMapData(data map[string]string) ConfigMapOption

func WithConfigMapLabels added in v0.17.0

func WithConfigMapLabels(labels metav1.LabelSelector) ConfigMapOption

type Ctor added in v0.17.0

Ctor functions create a k8s controller with given params.

type EndpointsOption added in v0.17.0

type EndpointsOption func(*corev1.Endpoints)

EndpointsOption enables further configuration of a Endpoints.

func WithEndpointsAddresses added in v0.17.0

func WithEndpointsAddresses(addrs ...corev1.EndpointAddress) EndpointsOption

func WithEndpointsAnnotations added in v0.17.0

func WithEndpointsAnnotations(annotations map[string]string) EndpointsOption

func WithEndpointsLabels added in v0.17.0

func WithEndpointsLabels(labels map[string]string) EndpointsOption

func WithEndpointsNotReadyAddresses added in v0.17.0

func WithEndpointsNotReadyAddresses(addrs ...corev1.EndpointAddress) EndpointsOption

type FlowsParallelOption

type FlowsParallelOption func(*flowsv1.Parallel)

ParallelOption enables further configuration of a Parallel.

func WithFlowsParallelAddressableNotReady

func WithFlowsParallelAddressableNotReady(reason, message string) FlowsParallelOption

func WithFlowsParallelBranchStatuses

func WithFlowsParallelBranchStatuses(branchStatuses []flowsv1.ParallelBranchStatus) FlowsParallelOption

func WithFlowsParallelBranches

func WithFlowsParallelBranches(branches []flowsv1.ParallelBranch) FlowsParallelOption

func WithFlowsParallelChannelTemplateSpec

func WithFlowsParallelChannelTemplateSpec(cts *messagingv1.ChannelTemplateSpec) FlowsParallelOption

func WithFlowsParallelChannelsNotReady

func WithFlowsParallelChannelsNotReady(reason, message string) FlowsParallelOption

func WithFlowsParallelGeneration

func WithFlowsParallelGeneration(gen int64) FlowsParallelOption

func WithFlowsParallelIngressChannelStatus

func WithFlowsParallelIngressChannelStatus(status flowsv1.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 added in v0.17.0

type InMemoryChannelOption func(*v1.InMemoryChannel)

InMemoryChannelOption enables further configuration of a v1.InMemoryChannel.

func WithInMemoryChannelAddress added in v0.17.0

func WithInMemoryChannelAddress(a string) InMemoryChannelOption

func WithInMemoryChannelChannelServiceNotReady added in v0.17.0

func WithInMemoryChannelChannelServiceNotReady(reason, message string) InMemoryChannelOption

func WithInMemoryChannelChannelServiceReady added in v0.17.0

func WithInMemoryChannelChannelServiceReady() InMemoryChannelOption

func WithInMemoryChannelDeploymentFailed added in v0.17.0

func WithInMemoryChannelDeploymentFailed(reason, message string) InMemoryChannelOption

func WithInMemoryChannelDeploymentReady added in v0.17.0

func WithInMemoryChannelDeploymentReady() InMemoryChannelOption

func WithInMemoryChannelDeploymentUnknown added in v0.17.0

func WithInMemoryChannelDeploymentUnknown(reason, message string) InMemoryChannelOption

func WithInMemoryChannelEndpointsNotReady added in v0.17.0

func WithInMemoryChannelEndpointsNotReady(reason, message string) InMemoryChannelOption

func WithInMemoryChannelEndpointsReady added in v0.17.0

func WithInMemoryChannelEndpointsReady() InMemoryChannelOption

func WithInMemoryChannelGeneration added in v0.17.0

func WithInMemoryChannelGeneration(gen int64) InMemoryChannelOption

func WithInMemoryChannelReady added in v0.17.0

func WithInMemoryChannelReady(host string) InMemoryChannelOption

func WithInMemoryChannelReadySubscriber added in v0.17.0

func WithInMemoryChannelReadySubscriber(uid string) InMemoryChannelOption

func WithInMemoryChannelReadySubscriberAndGeneration added in v0.17.0

func WithInMemoryChannelReadySubscriberAndGeneration(uid string, observedGeneration int64) InMemoryChannelOption

func WithInMemoryChannelServiceReady added in v0.17.0

func WithInMemoryChannelServiceReady() InMemoryChannelOption

func WithInMemoryChannelServicetNotReady added in v0.17.0

func WithInMemoryChannelServicetNotReady(reason, message string) InMemoryChannelOption

func WithInMemoryChannelStatusObservedGeneration added in v0.17.0

func WithInMemoryChannelStatusObservedGeneration(gen int64) InMemoryChannelOption

func WithInMemoryChannelStatusSubscribers added in v0.17.0

func WithInMemoryChannelStatusSubscribers(subscriberStatuses []duckv1.SubscriberStatus) InMemoryChannelOption

func WithInMemoryChannelSubscribers added in v0.17.0

func WithInMemoryChannelSubscribers(subscribers []duckv1.SubscriberSpec) InMemoryChannelOption

func WithInMemoryScopeAnnotation added in v0.17.0

func WithInMemoryScopeAnnotation(value string) InMemoryChannelOption

type Listers added in v0.17.0

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

func NewListers added in v0.17.0

func NewListers(objs []runtime.Object) Listers

func (*Listers) GetAllObjects added in v0.17.0

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

func (*Listers) GetApiServerSourceLister added in v0.17.0

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

func (*Listers) GetApiServerSourceV1alpha2Lister added in v0.17.0

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

func (*Listers) GetBrokerLister added in v0.17.0

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

func (*Listers) GetConfigMapLister added in v0.17.0

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

func (*Listers) GetContainerSourceLister added in v0.17.0

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

func (*Listers) GetDeploymentLister added in v0.17.0

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

func (*Listers) GetEndpointsLister added in v0.17.0

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

func (*Listers) GetEventingObjects added in v0.17.0

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

func (*Listers) GetInMemoryChannelLister added in v0.17.0

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

func (*Listers) GetK8sServiceLister added in v0.17.0

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

func (*Listers) GetKubeObjects added in v0.17.0

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

func (*Listers) GetMessagingChannelLister added in v0.17.0

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

func (*Listers) GetNamespaceLister added in v0.17.0

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

func (*Listers) GetParallelLister added in v0.17.0

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

func (*Listers) GetPingSourceV1alpha2Lister added in v0.17.0

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

func (*Listers) GetRoleBindingLister added in v0.17.0

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

func (*Listers) GetSequenceLister added in v0.17.0

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

func (*Listers) GetServiceAccountLister added in v0.17.0

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

func (*Listers) GetServiceLister added in v0.17.0

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

func (*Listers) GetSinkBindingLister added in v0.17.0

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

func (*Listers) GetSinkBindingV1alpha2Lister added in v0.17.0

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

func (*Listers) GetSubscriberObjects added in v0.17.0

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

func (*Listers) GetSubscriptionLister added in v0.17.0

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

func (*Listers) GetTriggerLister added in v0.17.0

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

type SequenceOption

type SequenceOption func(*flowsv1.Sequence)

SequenceOption enables further configuration of a Sequence.

func WithSequenceAddressableNotReady

func WithSequenceAddressableNotReady(reason, message string) SequenceOption

func WithSequenceChannelStatuses

func WithSequenceChannelStatuses(channelStatuses []flowsv1.SequenceChannelStatus) SequenceOption

func WithSequenceChannelTemplateSpec

func WithSequenceChannelTemplateSpec(cts *messagingv1.ChannelTemplateSpec) 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 []flowsv1.SequenceStep) SequenceOption

func WithSequenceSubscriptionStatuses

func WithSequenceSubscriptionStatuses(subscriptionStatuses []flowsv1.SequenceSubscriptionStatus) SequenceOption

func WithSequenceSubscriptionsNotReady

func WithSequenceSubscriptionsNotReady(reason, message string) SequenceOption

type TriggerOption added in v0.17.0

type TriggerOption func(*v1.Trigger)

TriggerOption enables further configuration of a Trigger.

func WithAnnotation added in v0.17.0

func WithAnnotation(key, value string) TriggerOption

func WithDependencyAnnotation added in v0.17.0

func WithDependencyAnnotation(dependencyAnnotation string) TriggerOption

func WithTriggerBrokerFailed added in v0.17.0

func WithTriggerBrokerFailed(reason, message string) TriggerOption

WithTriggerBrokerFailed marks the Broker as failed

func WithTriggerBrokerNotConfigured added in v0.17.0

func WithTriggerBrokerNotConfigured() TriggerOption

WithTriggerBrokerNotConfigured marks the Broker as not having been reconciled.

func WithTriggerBrokerReady added in v0.17.0

func WithTriggerBrokerReady() TriggerOption

WithTriggerBrokerReady initializes the Triggers's conditions.

func WithTriggerBrokerUnknown added in v0.17.0

func WithTriggerBrokerUnknown(reason, message string) TriggerOption

WithTriggerBrokerUnknown marks the Broker as unknown

func WithTriggerDependencyFailed added in v0.17.0

func WithTriggerDependencyFailed(reason, message string) TriggerOption

func WithTriggerDependencyReady added in v0.17.0

func WithTriggerDependencyReady() TriggerOption

func WithTriggerDependencyUnknown added in v0.17.0

func WithTriggerDependencyUnknown(reason, message string) TriggerOption

func WithTriggerGeneration added in v0.17.0

func WithTriggerGeneration(gen int64) TriggerOption

func WithTriggerNotSubscribed added in v0.17.0

func WithTriggerNotSubscribed(reason, message string) TriggerOption

func WithTriggerStatusObservedGeneration added in v0.17.0

func WithTriggerStatusObservedGeneration(gen int64) TriggerOption

func WithTriggerStatusSubscriberURI added in v0.17.0

func WithTriggerStatusSubscriberURI(uri string) TriggerOption

func WithTriggerSubscribed added in v0.17.0

func WithTriggerSubscribed() TriggerOption

func WithTriggerSubscribedUnknown added in v0.17.0

func WithTriggerSubscribedUnknown(reason, message string) TriggerOption

func WithTriggerSubscriberRef added in v0.17.0

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

func WithTriggerSubscriberRefAndURIReference added in v0.17.0

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

func WithTriggerSubscriberResolvedFailed added in v0.17.0

func WithTriggerSubscriberResolvedFailed(reason, message string) TriggerOption

func WithTriggerSubscriberResolvedSucceeded added in v0.17.0

func WithTriggerSubscriberResolvedSucceeded() TriggerOption

func WithTriggerSubscriberResolvedUnknown added in v0.17.0

func WithTriggerSubscriberResolvedUnknown(reason, message string) TriggerOption

func WithTriggerSubscriberURI added in v0.17.0

func WithTriggerSubscriberURI(rawurl string) TriggerOption

func WithTriggerSubscriptionNotConfigured added in v0.17.0

func WithTriggerSubscriptionNotConfigured() TriggerOption

func WithTriggerUID added in v0.17.0

func WithTriggerUID(uid string) TriggerOption

type UnstructuredOption added in v0.17.0

type UnstructuredOption func(*unstructured.Unstructured)

UnstructuredOption enables further configuration of a Unstructured.

func WithUnstructuredAddressable added in v0.17.0

func WithUnstructuredAddressable(hostname string) UnstructuredOption

Jump to

Keyboard shortcuts

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