testing

package
v0.0.0-...-a52e8f6 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const FakeChannelName = "fake-chan"
View Source
const FakeSubscriptionName = "fake-sub"

Variables

This section is empty.

Functions

func NewAppChannel

func NewAppChannel(appName string) *messagingv1alpha1.Channel

func NewAppNamespace

func NewAppNamespace(name string, brokerInjection bool) *corev1.Namespace

func NewAppSubscription

func NewAppSubscription(appNs, appName string, opts ...SubscriptionOption) *messagingv1alpha1.Subscription

func NewDefaultBroker

func NewDefaultBroker(ns string) *eventingv1alpha1.Broker

func NewFakeClients

func NewFakeClients(objs ...runtime.Object) (*eventingfake.Clientset, *k8sfake.Clientset)

NewFakeClients initializes fake Clientsets with an optional list of API objects.

Types

type ActionsAsserter

type ActionsAsserter struct {
	rt.Actions
}

func NewActionsAsserter

func NewActionsAsserter(t *testing.T, clis ...rt.ActionRecorder) *ActionsAsserter

func (*ActionsAsserter) AssertCreates

func (a *ActionsAsserter) AssertCreates(t *testing.T, expect []runtime.Object)

func (*ActionsAsserter) AssertDeletes

func (a *ActionsAsserter) AssertDeletes(t *testing.T, expect []string)

func (*ActionsAsserter) AssertUpdates

func (a *ActionsAsserter) AssertUpdates(t *testing.T, expect []runtime.Object)

type SubscriptionOption

type SubscriptionOption func(*messagingv1alpha1.Subscription)

SubscriptionOption is a functional option for Subscription objects.

func WithNameSuffix

func WithNameSuffix(nameSuffix string) SubscriptionOption

WithNameSuffix generates the name of a Subscription using its GenerateName prefix.

func WithSpec

func WithSpec(t *testing.T, subscriberURI string) SubscriptionOption

WithSpec sets the spec of a Subscription.

Jump to

Keyboard shortcuts

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