testing

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeFactory added in v0.6.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 MarkSubscriptionReady added in v0.6.0

func MarkSubscriptionReady(s *v1alpha1.Subscription)

func NewApiServerSource added in v0.6.0

func NewApiServerSource(name, namespace string, o ...ApiServerSourceOption) *v1alpha1.ApiServerSource

NewApiServerSource creates a ApiServer with ApiServerOptions

func NewBroker added in v0.6.0

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

NewBroker creates a Broker with BrokerOptions.

func NewChannel added in v0.6.0

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

NewChannel creates a Channel with ChannelOptions

func NewContainerSource added in v0.6.0

func NewContainerSource(name, namespace string, o ...ContainerSourceOption) *v1alpha1.ContainerSource

NewCronJob creates a CronJob with CronJobOptions

func NewCronJobSource added in v0.8.0

func NewCronJobSource(name, namespace string, o ...CronJobSourceOption) *v1alpha1.CronJobSource

NewCronJobSource creates a CronJobSource with CronJobOptions.

func NewCustomResourceDefinition added in v0.7.0

NewCustomResourceDefinition creates a CustomResourceDefinition with CustomResourceDefinitionOption.

func NewDeployment added in v0.6.0

func NewDeployment(name, namespace string, do ...DeploymentOption) *appsv1.Deployment

NewDeployment creates a Deployment with DeploymentOptions.

func NewEventType added in v0.6.0

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

NewEventType creates a EventType with EventTypeOptions.

func NewInMemoryChannel added in v0.7.0

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

NewInMemoryChannel creates an InMemoryChannel with InMemoryChannelOptions.

func NewNamespace added in v0.6.0

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

NewNamespace creates a Namespace with NamespaceOptions

func NewParallel added in v0.9.0

func NewParallel(name, namespace string, popt ...ParallelOption) *v1alpha1.Parallel

NewParallel creates an Parallel with ParallelOptions.

func NewScheme added in v0.6.0

func NewScheme() *runtime.Scheme

func NewSequence added in v0.7.0

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

NewSequence creates an Sequence with SequenceOptions.

func NewService added in v0.6.0

func NewService(name, namespace string, so ...ServiceOption) *corev1.Service

NewService creates a Service with ServiceOptions

func NewSubscription added in v0.6.0

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

NewSubscription creates a Subscription with SubscriptionOptions

func NewSubscriptionWithoutNamespace added in v0.6.0

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

NewSubscriptionWithoutNamespace creates a Subscription with SubscriptionOptions but without a specific namespace

func NewTrigger added in v0.6.0

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

NewTrigger creates a Trigger with TriggerOptions.

func NewUnstructured added in v0.6.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.6.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 WithApiServerSourceDeleted added in v0.6.0

func WithApiServerSourceDeleted(c *v1alpha1.ApiServerSource)

func WithApiServerSourceDeployed added in v0.6.0

func WithApiServerSourceDeployed(s *v1alpha1.ApiServerSource)

func WithApiServerSourceDeploymentUnavailable added in v0.8.0

func WithApiServerSourceDeploymentUnavailable(s *v1alpha1.ApiServerSource)

func WithApiServerSourceEventTypes added in v0.6.0

func WithApiServerSourceEventTypes(s *v1alpha1.ApiServerSource)

func WithApiServerSourceSinkNotFound added in v0.6.0

func WithApiServerSourceSinkNotFound(s *v1alpha1.ApiServerSource)

func WithBackingChannelReady added in v0.8.0

func WithBackingChannelReady(c *v1alpha1.Channel)

func WithBrokerDeletionTimestamp added in v0.6.0

func WithBrokerDeletionTimestamp(b *v1alpha1.Broker)

func WithBrokerReady added in v0.6.0

func WithBrokerReady(b *v1alpha1.Broker)

WithBrokerReady sets .Status to ready.

func WithChannelDeleted added in v0.6.0

func WithChannelDeleted(c *v1alpha1.Channel)

func WithContainerSourceDeleted added in v0.6.0

func WithContainerSourceDeleted(c *v1alpha1.ContainerSource)

func WithContainerSourceDeployed added in v0.6.0

func WithContainerSourceDeployed(s *v1alpha1.ContainerSource)

func WithCronJobSourceDeleted added in v0.6.0

func WithCronJobSourceDeleted(c *v1alpha1.CronJobSource)

func WithCronJobSourceDeployed added in v0.6.0

func WithCronJobSourceDeployed(s *v1alpha1.CronJobSource)

func WithCronJobSourceEventType added in v0.6.0

func WithCronJobSourceEventType(s *v1alpha1.CronJobSource)

func WithCronJobSourceSinkNotFound added in v0.6.0

func WithCronJobSourceSinkNotFound(s *v1alpha1.CronJobSource)

func WithEventTypeBrokerDoesNotExist added in v0.6.0

func WithEventTypeBrokerDoesNotExist(et *v1alpha1.EventType)

WithEventTypeBrokerNotFound calls .Status.MarkFilterFailed on the EventType.

func WithEventTypeBrokerExists added in v0.6.0

func WithEventTypeBrokerExists(et *v1alpha1.EventType)

WithEventTypeBrokerExists calls .Status.MarkBrokerExists on the EventType.

func WithEventTypeBrokerNotReady added in v0.6.0

func WithEventTypeBrokerNotReady(et *v1alpha1.EventType)

WithEventTypeBrokerNotReady calls .Status.MarkBrokerNotReady on the EventType.

func WithEventTypeBrokerReady added in v0.6.0

func WithEventTypeBrokerReady(et *v1alpha1.EventType)

WithEventTypeBrokerReady calls .Status.MarkBrokerReady on the EventType.

func WithEventTypeDeletionTimestamp added in v0.6.0

func WithEventTypeDeletionTimestamp(et *v1alpha1.EventType)

func WithInMemoryChannelDeleted added in v0.7.0

func WithInMemoryChannelDeleted(imc *v1alpha1.InMemoryChannel)

func WithInitApiServerSourceConditions added in v0.6.0

func WithInitApiServerSourceConditions(s *v1alpha1.ApiServerSource)

WithInitApiServerSourceConditions initializes the ApiServerSource's conditions.

func WithInitBrokerConditions added in v0.6.0

func WithInitBrokerConditions(b *v1alpha1.Broker)

WithInitBrokerConditions initializes the Broker's conditions.

func WithInitChannelConditions added in v0.6.0

func WithInitChannelConditions(c *v1alpha1.Channel)

WithInitChannelConditions initializes the Channel's conditions.

func WithInitContainerSourceConditions added in v0.6.0

func WithInitContainerSourceConditions(s *v1alpha1.ContainerSource)

WithInitContainerSourceConditions initializes the ContainerSource's conditions.

func WithInitCronJobSourceConditions added in v0.6.0

func WithInitCronJobSourceConditions(s *v1alpha1.CronJobSource)

WithInitCronJobSourceConditions initializes the CronJobSource's conditions.

func WithInitEventTypeConditions added in v0.6.0

func WithInitEventTypeConditions(et *v1alpha1.EventType)

WithInitEventTypeConditions initializes the EventType's conditions.

func WithInitInMemoryChannelConditions added in v0.7.0

func WithInitInMemoryChannelConditions(imc *v1alpha1.InMemoryChannel)

func WithInitParallelConditions added in v0.9.0

func WithInitParallelConditions(p *v1alpha1.Parallel)

func WithInitSequenceConditions added in v0.7.0

func WithInitSequenceConditions(p *v1alpha1.Sequence)

func WithInitSubscriptionConditions added in v0.6.0

func WithInitSubscriptionConditions(s *v1alpha1.Subscription)

WithInitSubscriptionConditions initializes the Subscriptions's conditions.

func WithInitTriggerConditions added in v0.6.0

func WithInitTriggerConditions(t *v1alpha1.Trigger)

WithInitTriggerConditions initializes the Triggers's conditions.

func WithInvalidCronJobSourceSchedule added in v0.6.0

func WithInvalidCronJobSourceSchedule(s *v1alpha1.CronJobSource)

func WithNamespaceDeleted added in v0.6.0

func WithNamespaceDeleted(n *corev1.Namespace)

func WithParallelDeleted added in v0.9.0

func WithParallelDeleted(p *v1alpha1.Parallel)

func WithSequenceDeleted added in v0.7.0

func WithSequenceDeleted(p *v1alpha1.Sequence)

func WithSubscriptionDeleted added in v0.6.0

func WithSubscriptionDeleted(s *v1alpha1.Subscription)

TODO: this can be a runtime object

func WithSubscriptionReady added in v0.6.0

func WithSubscriptionReady(s *v1alpha1.Subscription)

func WithTriggerDeleted added in v0.6.0

func WithTriggerDeleted(t *v1alpha1.Trigger)

TODO: this can be a runtime object

func WithValidCronJobSourceResources added in v0.7.0

func WithValidCronJobSourceResources(s *v1alpha1.CronJobSource)

func WithValidCronJobSourceSchedule added in v0.6.0

func WithValidCronJobSourceSchedule(s *v1alpha1.CronJobSource)

Types

type ApiServerSourceOption added in v0.6.0

type ApiServerSourceOption func(*v1alpha1.ApiServerSource)

ApiServerSourceOption enables further configuration of a ApiServer.

func WithApiServerSourceObjectMetaGeneration added in v0.9.0

func WithApiServerSourceObjectMetaGeneration(generation int64) ApiServerSourceOption

func WithApiServerSourceSink added in v0.6.0

func WithApiServerSourceSink(uri string) ApiServerSourceOption

func WithApiServerSourceSinkDepRef added in v0.10.0

func WithApiServerSourceSinkDepRef(uri string) ApiServerSourceOption

func WithApiServerSourceSpec added in v0.6.0

func WithApiServerSourceSpec(spec v1alpha1.ApiServerSourceSpec) ApiServerSourceOption

func WithApiServerSourceStatusObservedGeneration added in v0.9.0

func WithApiServerSourceStatusObservedGeneration(generation int64) ApiServerSourceOption

func WithApiServerSourceUID added in v0.9.0

func WithApiServerSourceUID(uid string) ApiServerSourceOption

type BrokerOption added in v0.6.0

type BrokerOption func(*v1alpha1.Broker)

BrokerOption enables further configuration of a Broker.

func WithBrokerAddress added in v0.6.0

func WithBrokerAddress(address string) BrokerOption

WithBrokerAddress sets the Broker's address.

func WithBrokerChannel added in v0.10.0

func WithBrokerChannel(crdType metav1.TypeMeta) BrokerOption

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

func WithBrokerIngressChannel added in v0.7.0

func WithBrokerIngressChannel(c *corev1.ObjectReference) BrokerOption

func WithBrokerIngressChannelReady added in v0.6.0

func WithBrokerIngressChannelReady() BrokerOption

func WithBrokerIngressSubscriptionFailed added in v0.6.0

func WithBrokerIngressSubscriptionFailed(reason, msg string) BrokerOption

func WithBrokerTriggerChannel added in v0.7.0

func WithBrokerTriggerChannel(c *corev1.ObjectReference) BrokerOption

func WithFilterDeploymentAvailable added in v0.6.0

func WithFilterDeploymentAvailable() BrokerOption

func WithFilterFailed added in v0.6.0

func WithFilterFailed(reason, msg string) BrokerOption

WithFilterFailed calls .Status.MarkFilterFailed on the Broker.

func WithIngressChannelFailed added in v0.6.0

func WithIngressChannelFailed(reason, msg string) BrokerOption

WithIngressChannelFailed calls .Status.MarkIngressChannelFailed on the Broker.

func WithIngressDeploymentAvailable added in v0.6.0

func WithIngressDeploymentAvailable() BrokerOption

func WithIngressFailed added in v0.6.0

func WithIngressFailed(reason, msg string) BrokerOption

WithIngressFailed calls .Status.MarkIngressFailed on the Broker.

func WithTriggerChannelFailed added in v0.6.0

func WithTriggerChannelFailed(reason, msg string) BrokerOption

WithTriggerChannelFailed calls .Status.MarkTriggerChannelFailed on the Broker.

func WithTriggerChannelReady added in v0.6.0

func WithTriggerChannelReady() BrokerOption

WithTriggerChannelReady calls .Status.PropagateTriggerChannelReadiness on the Broker.

type Buildable

type Buildable interface {
	Build() runtime.Object
}

Buildable allows test fixtures to use the builder pattern. The table test runner will call Build() on any Buildable objects and use the result as the test fixture.

type ChannelOption added in v0.6.0

type ChannelOption func(*v1alpha1.Channel)

ChannelOption enables further configuration of a Channel.

func WithBackingChannelFailed added in v0.8.0

func WithBackingChannelFailed(reason, msg string) ChannelOption

func WithBackingChannelObjRef added in v0.8.0

func WithBackingChannelObjRef(objRef *v1.ObjectReference) ChannelOption

func WithChannelAddress added in v0.6.0

func WithChannelAddress(hostname string) ChannelOption

func WithChannelReadySubscriber added in v0.9.0

func WithChannelReadySubscriber(uid string) ChannelOption

func WithChannelReadySubscriberAndGeneration added in v0.9.0

func WithChannelReadySubscriberAndGeneration(uid string, observedGeneration int64) ChannelOption

func WithChannelSubscriberStatuses added in v0.9.0

func WithChannelSubscriberStatuses(subscriberStatuses []eventingduckv1alpha1.SubscriberStatus) ChannelOption

func WithChannelSubscribers added in v0.6.0

func WithChannelSubscribers(subscribers []eventingduckv1alpha1.SubscriberSpec) ChannelOption

func WithChannelTemplate added in v0.9.0

func WithChannelTemplate(typeMeta metav1.TypeMeta) ChannelOption

type ContainerSourceOption added in v0.6.0

type ContainerSourceOption func(*v1alpha1.ContainerSource)

ContainerSourceOption enables further configuration of a CronJob.

func WithContainerSourceAnnotations added in v0.6.0

func WithContainerSourceAnnotations(annotations map[string]string) ContainerSourceOption

func WithContainerSourceDeployFailed added in v0.6.0

func WithContainerSourceDeployFailed(msg string) ContainerSourceOption

func WithContainerSourceDeploying added in v0.6.0

func WithContainerSourceDeploying(msg string) ContainerSourceOption

func WithContainerSourceLabels added in v0.6.0

func WithContainerSourceLabels(labels map[string]string) ContainerSourceOption

func WithContainerSourceObjectMetaGeneration added in v0.9.0

func WithContainerSourceObjectMetaGeneration(generation int64) ContainerSourceOption

func WithContainerSourceSink added in v0.6.0

func WithContainerSourceSink(uri string) ContainerSourceOption

func WithContainerSourceSinkMissing added in v0.6.0

func WithContainerSourceSinkMissing(msg string) ContainerSourceOption

func WithContainerSourceSinkNotFound added in v0.6.0

func WithContainerSourceSinkNotFound(msg string) ContainerSourceOption

func WithContainerSourceSpec added in v0.6.0

func WithContainerSourceSpec(spec v1alpha1.ContainerSourceSpec) ContainerSourceOption

func WithContainerSourceStatusObservedGeneration added in v0.9.0

func WithContainerSourceStatusObservedGeneration(generation int64) ContainerSourceOption

func WithContainerSourceUID added in v0.6.0

func WithContainerSourceUID(uid types.UID) ContainerSourceOption

type CronJobSourceOption added in v0.6.0

type CronJobSourceOption func(*v1alpha1.CronJobSource)

CronJobSourceOption enables further configuration of a CronJob.

func WithCronJobApiVersion added in v0.9.0

func WithCronJobApiVersion(apiVersion string) CronJobSourceOption

func WithCronJobSourceObjectMetaGeneration added in v0.9.0

func WithCronJobSourceObjectMetaGeneration(generation int64) CronJobSourceOption

func WithCronJobSourceSink added in v0.6.0

func WithCronJobSourceSink(uri string) CronJobSourceOption

func WithCronJobSourceSpec added in v0.6.0

func WithCronJobSourceSpec(spec v1alpha1.CronJobSourceSpec) CronJobSourceOption

func WithCronJobSourceStatusObservedGeneration added in v0.9.0

func WithCronJobSourceStatusObservedGeneration(generation int64) CronJobSourceOption

func WithCronJobSourceUID added in v0.9.0

func WithCronJobSourceUID(uid string) CronJobSourceOption

type Ctor added in v0.6.0

Ctor functions create a k8s controller with given params.

type CustomResourceDefinitionOption added in v0.7.0

type CustomResourceDefinitionOption func(*apiextensionsv1beta1.CustomResourceDefinition)

CustomResourceDefinitionOption enables further configuration of a CustomResourceDefinition.

func WithCustomResourceDefinitionLabels added in v0.7.0

func WithCustomResourceDefinitionLabels(labels map[string]string) CustomResourceDefinitionOption

WithCustomResourceDefinitionLabels sets the CRD's labels.

type DeploymentOption added in v0.6.0

type DeploymentOption func(*appsv1.Deployment)

DeploymentOption enables further configuration of a Deployment.

func WithDeploymentAnnotations added in v0.6.0

func WithDeploymentAnnotations(annotations map[string]string) DeploymentOption

func WithDeploymentAvailable added in v0.8.0

func WithDeploymentAvailable() DeploymentOption

WithDeploymentAvailable marks the Deployment as available.

func WithDeploymentContainer added in v0.6.0

func WithDeploymentContainer(name, image string, liveness *corev1.Probe, readiness *corev1.Probe, envVars []corev1.EnvVar, containerPorts []corev1.ContainerPort) DeploymentOption

func WithDeploymentLabels added in v0.6.0

func WithDeploymentLabels(labels map[string]string) DeploymentOption

func WithDeploymentOwnerReferences added in v0.6.0

func WithDeploymentOwnerReferences(ownerReferences []metav1.OwnerReference) DeploymentOption

func WithDeploymentServiceAccount added in v0.6.0

func WithDeploymentServiceAccount(serviceAccountName string) DeploymentOption

type DynamicMocks added in v0.5.0

type DynamicMocks struct {
	// MockResources corresponds to dynamic.Interface.
	MockResources []MockDynamicResource

	// All other fields correspond to their dynamic.ResourceInterface equivalents.
	MockCreates           []MockDynamicCreate
	MockUpdates           []MockDynamicUpdate
	MockUpdateStatuses    []MockDynamicUpdateStatus
	MockDeletes           []MockDynamicDelete
	MockDeleteCollections []MockDynamicDeleteCollection
	MockGets              []MockDynamicGet
	MockLists             []MockDynamicList
	MockWatches           []MockDynamicWatch
	MockPatches           []MockDynamicPatch
}

The mocks to run on each function type. Each function will run through the mocks in its list until one responds with 'Handled'. If there is more than one mock in the list, then the one that responds 'Handled' will be removed and not run on subsequent calls to the function. If no mocks respond 'Handled', then the real underlying client is called.

type EventTypeOption added in v0.6.0

type EventTypeOption func(*v1alpha1.EventType)

EventTypeOption enables further configuration of an EventType.

func WithEventTypeBroker added in v0.6.0

func WithEventTypeBroker(broker string) EventTypeOption

func WithEventTypeDescription added in v0.6.0

func WithEventTypeDescription(description string) EventTypeOption

func WithEventTypeLabels added in v0.6.0

func WithEventTypeLabels(labels map[string]string) EventTypeOption

func WithEventTypeOwnerReference added in v0.6.0

func WithEventTypeOwnerReference(ownerRef metav1.OwnerReference) EventTypeOption

func WithEventTypeSource added in v0.6.0

func WithEventTypeSource(source string) EventTypeOption

func WithEventTypeType added in v0.6.0

func WithEventTypeType(t string) EventTypeOption

type InMemoryChannelOption added in v0.7.0

type InMemoryChannelOption func(*v1alpha1.InMemoryChannel)

InMemoryChannelOption enables further configuration of a InMemoryChannel.

func WithInMemoryChannelAddress added in v0.7.0

func WithInMemoryChannelAddress(a string) InMemoryChannelOption

func WithInMemoryChannelChannelServiceReady added in v0.7.0

func WithInMemoryChannelChannelServiceReady() InMemoryChannelOption

func WithInMemoryChannelChannelServicetNotReady added in v0.7.0

func WithInMemoryChannelChannelServicetNotReady(reason, message string) InMemoryChannelOption

func WithInMemoryChannelDeploymentNotReady added in v0.7.0

func WithInMemoryChannelDeploymentNotReady(reason, message string) InMemoryChannelOption

func WithInMemoryChannelDeploymentReady added in v0.7.0

func WithInMemoryChannelDeploymentReady() InMemoryChannelOption

func WithInMemoryChannelEndpointsNotReady added in v0.7.0

func WithInMemoryChannelEndpointsNotReady(reason, message string) InMemoryChannelOption

func WithInMemoryChannelEndpointsReady added in v0.7.0

func WithInMemoryChannelEndpointsReady() InMemoryChannelOption

func WithInMemoryChannelServiceReady added in v0.7.0

func WithInMemoryChannelServiceReady() InMemoryChannelOption

func WithInMemoryChannelServicetNotReady added in v0.7.0

func WithInMemoryChannelServicetNotReady(reason, message string) InMemoryChannelOption

func WithInMemoryChannelStatusSubscribers added in v0.7.0

func WithInMemoryChannelStatusSubscribers(subscriberStatuses []duckv1alpha1.SubscriberStatus) InMemoryChannelOption

func WithInMemoryChannelSubscribers added in v0.7.0

func WithInMemoryChannelSubscribers(subscribers []duckv1alpha1.SubscriberSpec) InMemoryChannelOption

type Listers added in v0.6.0

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

func NewListers added in v0.6.0

func NewListers(objs []runtime.Object) Listers

func (*Listers) GetAllObjects added in v0.6.0

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

func (*Listers) GetApiServerSourceLister added in v0.6.0

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

func (*Listers) GetBrokerLister added in v0.6.0

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

func (*Listers) GetConfigMapLister added in v0.6.0

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

func (*Listers) GetContainerSourceLister added in v0.6.0

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

func (*Listers) GetCronJobSourceLister added in v0.6.0

func (l *Listers) GetCronJobSourceLister() sourcelisters.CronJobSourceLister

func (*Listers) GetCustomResourceDefinitionLister added in v0.7.0

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

func (*Listers) GetDeploymentLister added in v0.6.0

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

func (*Listers) GetEndpointsLister added in v0.6.0

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

func (*Listers) GetEventTypeLister added in v0.6.0

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

func (*Listers) GetEventingObjects added in v0.6.0

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

func (*Listers) GetInMemoryChannelLister added in v0.7.0

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

func (*Listers) GetK8sServiceLister added in v0.6.0

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

func (*Listers) GetKubeObjects added in v0.6.0

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

func (*Listers) GetMessagingChannelLister added in v0.8.0

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

func (*Listers) GetNamespaceLister added in v0.6.0

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

func (*Listers) GetParallelLister added in v0.9.0

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

func (*Listers) GetRoleBindingLister added in v0.6.0

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

func (*Listers) GetSequenceLister added in v0.7.0

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

func (*Listers) GetServiceAccountLister added in v0.6.0

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

func (*Listers) GetServiceLister added in v0.7.0

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

func (*Listers) GetSharedObjects added in v0.6.0

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

func (*Listers) GetSubscriberObjects added in v0.6.0

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

func (*Listers) GetSubscriptionLister added in v0.6.0

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

func (*Listers) GetTriggerLister added in v0.6.0

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

type MockDynamicContext added in v0.5.0

type MockDynamicContext struct {
	InnerInterface dynamic.ResourceInterface
	Resource       schema.GroupVersionResource
	Namespace      string
}

type MockDynamicCreate added in v0.5.0

type MockDynamicCreate func(ctx *MockDynamicContext, obj *unstructured.Unstructured, options metav1.CreateOptions, subresources ...string) (MockHandled, *unstructured.Unstructured, error)

All of the functions in dynamic.Resource get mocked equivalents. For the function dynamic.Resource.Foo(), the mocked equivalent will be: MockDynamicFoo func(ctx *MockDynamicContext[, Foo's arguments]) (MockHandled[, Foo's returns])

type MockDynamicDelete added in v0.5.0

type MockDynamicDelete func(ctx *MockDynamicContext, name string, options *metav1.DeleteOptions, subresources ...string) (MockHandled, error)

type MockDynamicDeleteCollection added in v0.5.0

type MockDynamicDeleteCollection func(ctx *MockDynamicContext, options *metav1.DeleteOptions, listOptions metav1.ListOptions) (MockHandled, error)

type MockDynamicGet added in v0.5.0

type MockDynamicGet func(ctx *MockDynamicContext, name string, options metav1.GetOptions, subresources ...string) (MockHandled, *unstructured.Unstructured, error)

type MockDynamicInterface added in v0.5.0

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

func NewMockDynamicInterface added in v0.5.0

func NewMockDynamicInterface(innerInterface dynamic.Interface, mocks DynamicMocks) *MockDynamicInterface

func (MockDynamicInterface) Resource added in v0.5.0

type MockDynamicList added in v0.5.0

type MockDynamicPatch added in v0.5.0

type MockDynamicPatch func(ctx *MockDynamicContext, name string, pt types.PatchType, data []byte, options metav1.PatchOptions, subresources ...string) (MockHandled, *unstructured.Unstructured, error)

type MockDynamicResource added in v0.5.0

type MockDynamicResource func(innerInterface dynamic.Interface, resource schema.GroupVersionResource) (MockHandled, dynamic.NamespaceableResourceInterface)

All of the functions in dynamic.Interface get mocked equivalents.

type MockDynamicUpdate added in v0.5.0

type MockDynamicUpdate func(ctx *MockDynamicContext, obj *unstructured.Unstructured, options metav1.UpdateOptions, subresources ...string) (MockHandled, *unstructured.Unstructured, error)

type MockDynamicUpdateStatus added in v0.5.0

type MockDynamicUpdateStatus func(ctx *MockDynamicContext, obj *unstructured.Unstructured, options metav1.UpdateOptions) (MockHandled, *unstructured.Unstructured, error)

type MockDynamicWatch added in v0.5.0

type MockDynamicWatch func(ctx *MockDynamicContext, opts metav1.ListOptions) (MockHandled, watch.Interface, error)

type MockEventRecorder

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

MockEventRecorder is a recorder.EventRecorder that saves emitted v1 Events.

func NewEventRecorder

func NewEventRecorder() *MockEventRecorder

func (*MockEventRecorder) AnnotatedEventf

func (m *MockEventRecorder) AnnotatedEventf(object runtime.Object, annotations map[string]string, eventtype, reason, messageFmt string, args ...interface{})

func (*MockEventRecorder) Event

func (m *MockEventRecorder) Event(object runtime.Object, eventtype, reason, message string)

func (*MockEventRecorder) Eventf

func (m *MockEventRecorder) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{})

func (*MockEventRecorder) PastEventf

func (m *MockEventRecorder) PastEventf(object runtime.Object, timestamp metav1.Time, eventtype, reason, messageFmt string, args ...interface{})

type MockHandled

type MockHandled int
const (
	// This mock has handled the function call, no further mocks nor the real client should be
	// called.
	Handled MockHandled = iota
	// This mock has not handled the function call, subsequent mocks or the real client should be
	// called.
	Unhandled
)

type NamespaceOption added in v0.6.0

type NamespaceOption func(*corev1.Namespace)

NamespaceOption enables further configuration of a Namespace.

func WithNamespaceLabeled added in v0.6.0

func WithNamespaceLabeled(labels map[string]string) NamespaceOption

type ParallelOption added in v0.9.0

type ParallelOption func(*v1alpha1.Parallel)

ParallelOption enables further configuration of a Parallel.

func WithParallelAddressableNotReady added in v0.9.0

func WithParallelAddressableNotReady(reason, message string) ParallelOption

func WithParallelBranchStatuses added in v0.9.0

func WithParallelBranchStatuses(branchStatuses []v1alpha1.ParallelBranchStatus) ParallelOption

func WithParallelBranches added in v0.9.0

func WithParallelBranches(branches []v1alpha1.ParallelBranch) ParallelOption

func WithParallelChannelTemplateSpec added in v0.9.0

func WithParallelChannelTemplateSpec(cts *eventingduck.ChannelTemplateSpec) ParallelOption

func WithParallelChannelsNotReady added in v0.9.0

func WithParallelChannelsNotReady(reason, message string) ParallelOption

func WithParallelDeprecatedBranchReplyStatus added in v0.10.0

func WithParallelDeprecatedBranchReplyStatus() ParallelOption

func WithParallelDeprecatedReplyStatus added in v0.10.0

func WithParallelDeprecatedReplyStatus() ParallelOption

func WithParallelIngressChannelStatus added in v0.9.0

func WithParallelIngressChannelStatus(status v1alpha1.ParallelChannelStatus) ParallelOption

func WithParallelReply added in v0.9.0

func WithParallelReply(reply *pkgv1alpha1.Destination) ParallelOption

func WithParallelSubscriptionsNotReady added in v0.9.0

func WithParallelSubscriptionsNotReady(reason, message string) ParallelOption

type SequenceOption added in v0.7.0

type SequenceOption func(*v1alpha1.Sequence)

SequenceOption enables further configuration of a Sequence.

func WithSequenceAddressableNotReady added in v0.7.0

func WithSequenceAddressableNotReady(reason, message string) SequenceOption

func WithSequenceChannelStatuses added in v0.7.0

func WithSequenceChannelStatuses(channelStatuses []v1alpha1.SequenceChannelStatus) SequenceOption

func WithSequenceChannelTemplateSpec added in v0.7.0

func WithSequenceChannelTemplateSpec(cts *eventingduckv1alpha1.ChannelTemplateSpec) SequenceOption

func WithSequenceChannelsNotReady added in v0.7.0

func WithSequenceChannelsNotReady(reason, message string) SequenceOption

func WithSequenceDeprecatedReplyStatus added in v0.10.0

func WithSequenceDeprecatedReplyStatus() SequenceOption

func WithSequenceReply added in v0.7.0

func WithSequenceReply(reply *pkgv1alpha1.Destination) SequenceOption

func WithSequenceSteps added in v0.7.0

func WithSequenceSteps(steps []pkgv1alpha1.Destination) SequenceOption

func WithSequenceSubscriptionStatuses added in v0.7.0

func WithSequenceSubscriptionStatuses(subscriptionStatuses []v1alpha1.SequenceSubscriptionStatus) SequenceOption

func WithSequenceSubscriptionsNotReady added in v0.7.0

func WithSequenceSubscriptionsNotReady(reason, message string) SequenceOption

type ServiceOption added in v0.6.0

type ServiceOption func(*corev1.Service)

ServiceOption enables further configuration of a Service.

func WithServiceAnnotations added in v0.8.0

func WithServiceAnnotations(annotations map[string]string) ServiceOption

func WithServiceLabels added in v0.6.0

func WithServiceLabels(labels map[string]string) ServiceOption

func WithServiceOwnerReferences added in v0.6.0

func WithServiceOwnerReferences(ownerReferences []metav1.OwnerReference) ServiceOption

func WithServicePorts added in v0.6.0

func WithServicePorts(ports []corev1.ServicePort) ServiceOption

type SubscriptionOption added in v0.6.0

type SubscriptionOption func(*v1alpha1.Subscription)

SubscriptionOption enables further configuration of a Subscription.

func WithSubscriptionChannel added in v0.6.0

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

func WithSubscriptionFinalizers added in v0.6.0

func WithSubscriptionFinalizers(finalizers ...string) SubscriptionOption

func WithSubscriptionGenerateName added in v0.6.0

func WithSubscriptionGenerateName(generateName string) SubscriptionOption

func WithSubscriptionGeneration added in v0.7.0

func WithSubscriptionGeneration(gen int64) SubscriptionOption

func WithSubscriptionLabels added in v0.6.0

func WithSubscriptionLabels(labels map[string]string) SubscriptionOption

func WithSubscriptionOwnerReferences added in v0.6.0

func WithSubscriptionOwnerReferences(ownerReferences []metav1.OwnerReference) SubscriptionOption

func WithSubscriptionPhysicalSubscriptionReply added in v0.6.0

func WithSubscriptionPhysicalSubscriptionReply(uri string) SubscriptionOption

func WithSubscriptionPhysicalSubscriptionSubscriber added in v0.6.0

func WithSubscriptionPhysicalSubscriptionSubscriber(uri string) SubscriptionOption

func WithSubscriptionReferencesNotResolved added in v0.7.0

func WithSubscriptionReferencesNotResolved(reason, msg string) SubscriptionOption

func WithSubscriptionReply added in v0.6.0

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

func WithSubscriptionReplyDeprecated added in v0.10.0

func WithSubscriptionReplyDeprecated() SubscriptionOption

func WithSubscriptionReplyNotDeprecated added in v0.10.0

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

func WithSubscriptionSubscriberRef added in v0.6.0

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

func WithSubscriptionUID added in v0.6.0

func WithSubscriptionUID(uid types.UID) SubscriptionOption

type TriggerOption added in v0.6.0

type TriggerOption func(*v1alpha1.Trigger)

TriggerOption enables further configuration of a Trigger.

func WithDependencyAnnotation added in v0.9.0

func WithDependencyAnnotation(dependencyAnnotation string) TriggerOption

func WithInjectionAnnotation added in v0.10.0

func WithInjectionAnnotation(injectionAnnotation string) TriggerOption

func WithTriggerBrokerFailed added in v0.6.0

func WithTriggerBrokerFailed(reason, message string) TriggerOption

WithTriggerBrokerFailed marks the Broker as failed

func WithTriggerBrokerReady added in v0.6.0

func WithTriggerBrokerReady() TriggerOption

WithTriggerBrokerReady initializes the Triggers's conditions.

func WithTriggerDependencyFailed added in v0.9.0

func WithTriggerDependencyFailed(reason, message string) TriggerOption

func WithTriggerDependencyReady added in v0.9.0

func WithTriggerDependencyReady() TriggerOption

func WithTriggerDependencyUnknown added in v0.9.0

func WithTriggerDependencyUnknown(reason, message string) TriggerOption

func WithTriggerNotSubscribed added in v0.6.0

func WithTriggerNotSubscribed(reason, message string) TriggerOption

func WithTriggerStatusSubscriberURI added in v0.6.0

func WithTriggerStatusSubscriberURI(uri string) TriggerOption

func WithTriggerSubscribed added in v0.6.0

func WithTriggerSubscribed() TriggerOption

func WithTriggerSubscriberRef added in v0.6.0

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

func WithTriggerSubscriberRefAndURIReference added in v0.10.0

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

func WithTriggerSubscriberResolvedFailed added in v0.10.1

func WithTriggerSubscriberResolvedFailed(reason, message string) TriggerOption

func WithTriggerSubscriberResolvedSucceeded added in v0.10.1

func WithTriggerSubscriberResolvedSucceeded() TriggerOption

func WithTriggerSubscriberResolvedUnknown added in v0.10.1

func WithTriggerSubscriberResolvedUnknown(reason, message string) TriggerOption

func WithTriggerSubscriberURI added in v0.6.0

func WithTriggerSubscriberURI(rawurl string) TriggerOption

func WithTriggerUID added in v0.6.0

func WithTriggerUID(uid string) TriggerOption

func WithUnmarshalFailedDependencyAnnotation added in v0.9.0

func WithUnmarshalFailedDependencyAnnotation() TriggerOption

type UnstructuredOption added in v0.6.0

type UnstructuredOption func(*unstructured.Unstructured)

UnstructuredOption enables further configuration of a Unstructured.

func WithUnstructuredAddressable added in v0.6.0

func WithUnstructuredAddressable(hostname string) UnstructuredOption

Jump to

Keyboard shortcuts

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