testing

package
v0.23.2 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeFactory

func MakeFactory(ctor Ctor) Factory

MakeFactory creates a reconciler factory with fake clients and controller created by `ctor`.

func NewNatssChannel

func NewNatssChannel(name, namespace string, ncopt ...NatssChannelOption) *v1beta1.NatssChannel

NewNatssChannel creates an NatssChannel with NatssChannelOptions.

func WithNatssChannelDeleted

func WithNatssChannelDeleted(nc *v1beta1.NatssChannel)

func WithNatssChannelFinalizer

func WithNatssChannelFinalizer(nc *v1beta1.NatssChannel)

func WithNatssInitChannelConditions

func WithNatssInitChannelConditions(nc *v1beta1.NatssChannel)

func WithReady

func WithReady(nc *v1beta1.NatssChannel)

WithReady marks a NatssChannel as being ready The dispatcher reconciler does not set the ready status, instead the controller reconciler does For testing, we need to be able to set the status to ready

Types

type Ctor

Ctor functions create a k8s controller with given params.

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

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

func (*Listers) GetEndpointsLister

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

func (*Listers) GetEventingObjects

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

func (*Listers) GetEventsObjects

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

func (*Listers) GetKubeObjects

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

func (*Listers) GetNatssChannelLister

func (l *Listers) GetNatssChannelLister() natsslisters.NatssChannelLister

func (*Listers) GetNatssObjects added in v0.19.0

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

func (*Listers) GetServiceLister

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

type NatssChannelOption

type NatssChannelOption func(*v1beta1.NatssChannel)

NatssChannelOption enables further configuration of a NatssChannel.

func Addressable

func Addressable() NatssChannelOption

func WithNatssChannelAddress

func WithNatssChannelAddress(a string) NatssChannelOption

func WithNatssChannelChannelServiceReady

func WithNatssChannelChannelServiceReady() NatssChannelOption

func WithNatssChannelChannelServicetNotReady

func WithNatssChannelChannelServicetNotReady(reason, message string) NatssChannelOption

func WithNatssChannelDeploymentNotReady

func WithNatssChannelDeploymentNotReady(reason, message string) NatssChannelOption

func WithNatssChannelDeploymentReady

func WithNatssChannelDeploymentReady() NatssChannelOption

func WithNatssChannelEndpointsNotReady

func WithNatssChannelEndpointsNotReady(reason, message string) NatssChannelOption

func WithNatssChannelEndpointsReady

func WithNatssChannelEndpointsReady() NatssChannelOption

func WithNatssChannelReadySubscriber added in v0.19.1

func WithNatssChannelReadySubscriber(uid string) NatssChannelOption

func WithNatssChannelReadySubscriberAndGeneration added in v0.19.1

func WithNatssChannelReadySubscriberAndGeneration(uid string, observedGeneration int64) NatssChannelOption

func WithNatssChannelServiceNotReady

func WithNatssChannelServiceNotReady(reason, message string) NatssChannelOption

func WithNatssChannelServiceReady

func WithNatssChannelServiceReady() NatssChannelOption

func WithNatssChannelSubscribableStatus

func WithNatssChannelSubscribableStatus(ready corev1.ConditionStatus, message string) NatssChannelOption

func WithNatssChannelSubscriber added in v0.19.1

func WithNatssChannelSubscriber(t *testing.T, subscriberURI string) NatssChannelOption

func WithNatssChannelSubscribers

func WithNatssChannelSubscribers(subscribers []duckv1.SubscriberSpec) NatssChannelOption

func WithNotReady

func WithNotReady(reason, messageFormat string) NatssChannelOption

Jump to

Keyboard shortcuts

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