helpers

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChannelNameSuffix = "Channel"
)

Variables

This section is empty.

Functions

func BrokerTracingTestHelperWithChannelTestRunner added in v0.10.0

func BrokerTracingTestHelperWithChannelTestRunner(
	t *testing.T,
	brokerClass string,
	channelTestRunner testlib.ComponentsTestRunner,
	setupClient testlib.SetupClientOption,
)

BrokerTracingTestHelperWithChannelTestRunner runs the Broker tracing tests for all Channels in the ComponentsTestRunner.

func BrokerV1Beta1ControlPlaneTestHelperWithChannelTestRunner added in v0.16.0

func BrokerV1Beta1ControlPlaneTestHelperWithChannelTestRunner(
	t *testing.T,
	brokerClass string,
	channelTestRunner testlib.ComponentsTestRunner,
	setupClient ...testlib.SetupClientOption,
)

This tests if the broker control plane: 1. Trigger can be created before Broker (with attributes filter) 2. Broker can be created and progresses to Ready 3. Ready Broker is Addressable 4. Trigger with Ready broker progresses to Ready 5. Trigger with no broker, updated with broker, updates status to include subscriberURI 6. Ready Trigger includes status.subscriberUri

func BrokerV1Beta1CreatedToReadyHelper added in v0.16.0

func BrokerV1Beta1CreatedToReadyHelper(t *testing.T, brokerName, brokerClass string, client *testlib.Client, channel metav1.TypeMeta)

func ChannelCRDMetadataTestHelperWithChannelTestRunner added in v0.15.0

func ChannelCRDMetadataTestHelperWithChannelTestRunner(
	t *testing.T,
	channelTestRunner testlib.ComponentsTestRunner,
	options ...testlib.SetupClientOption,
)

ChannelCRDMetadataTestHelperWithChannelTestRunner runs the Channel CRD metadata tests for all Channel resources in the ComponentsTestRunner.

func ChannelCRDNameTestHelperWithChannelTestRunner added in v0.15.0

func ChannelCRDNameTestHelperWithChannelTestRunner(
	t *testing.T,
	channelTestRunner testlib.ComponentsTestRunner,
	options ...testlib.SetupClientOption,
)

ChannelCRDNameTestHelperWithChannelTestRunner runs the Channel CRD name tests for all Channel resources in the ComponentsTestRunner.

func ChannelDataPlaneFailureTestRunner added in v0.16.0

func ChannelDataPlaneFailureTestRunner(
	t *testing.T,
	channelTestRunner testlib.ComponentsTestRunner,
	options ...testlib.SetupClientOption,
)

ChannelDataPlaneFailureTestRunner tests some status codes from the spec

func ChannelDataPlaneSuccessTestRunner added in v0.16.0

func ChannelDataPlaneSuccessTestRunner(
	t *testing.T,
	channelTestRunner testlib.ComponentsTestRunner,
	options ...testlib.SetupClientOption,
)

ChannelDataPlaneSuccessTestRunner tests the support of the channel ingress for different spec versions and message modes

func ChannelSpecTestHelperWithChannelTestRunner added in v0.15.0

func ChannelSpecTestHelperWithChannelTestRunner(
	t *testing.T,
	channelTestRunner testlib.ComponentsTestRunner,
	options ...testlib.SetupClientOption,
)

func ChannelStatusSubscriberTestHelperWithChannelTestRunner added in v0.15.0

func ChannelStatusSubscriberTestHelperWithChannelTestRunner(
	t *testing.T,
	channelTestRunner testlib.ComponentsTestRunner,
	options ...testlib.SetupClientOption,
)

ChannelStatusSubscriberTestHelperWithChannelTestRunner runs the tests of subscriber field of status for all Channels in the ComponentsTestRunner.

func ChannelStatusTestHelperWithChannelTestRunner added in v0.15.0

func ChannelStatusTestHelperWithChannelTestRunner(
	t *testing.T,
	channelTestRunner testlib.ComponentsTestRunner,
	options ...testlib.SetupClientOption,
)

ChannelStatusTestHelperWithChannelTestRunner runs the Channel status tests for all Channels in the ComponentsTestRunner.

func ChannelTracingTestHelperWithChannelTestRunner added in v0.10.0

func ChannelTracingTestHelperWithChannelTestRunner(
	t *testing.T,
	channelTestRunner testlib.ComponentsTestRunner,
	setupClient testlib.SetupClientOption,
)

ChannelTracingTestHelperWithChannelTestRunner runs the Channel tracing tests for all Channels in the ComponentsTestRunner.

func ReadyBrokerV1Beta1AvailableHelper added in v0.16.0

func ReadyBrokerV1Beta1AvailableHelper(t *testing.T, brokerName string, client *testlib.Client)

func ServiceAccountCanDoVerbOnResourceOrFail added in v0.16.0

func ServiceAccountCanDoVerbOnResourceOrFail(client *testlib.Client, gvr schema.GroupVersionResource, subresource string, saName string, verb string)

func SingleEventWithKnativeHeaderHelperForChannelTestHelper added in v0.16.0

func SingleEventWithKnativeHeaderHelperForChannelTestHelper(
	t *testing.T,
	encoding cloudevents.Encoding,
	channelTestRunner testlib.ComponentsTestRunner,
	options ...testlib.SetupClientOption,
)

SingleEventWithKnativeHeaderHelperForChannelTestHelper is the helper function for header_test

func SourceCRDMetadataTestHelperWithChannelTestRunner added in v0.16.0

func SourceCRDMetadataTestHelperWithChannelTestRunner(
	t *testing.T,
	sourceTestRunner testlib.ComponentsTestRunner,
	options ...testlib.SetupClientOption,
)

func TestChannelAddressableResolverClusterRoleTestRunner added in v0.16.0

func TestChannelAddressableResolverClusterRoleTestRunner(
	t *testing.T,
	channelTestRunner testlib.ComponentsTestRunner,
	options ...testlib.SetupClientOption,
)

func TestChannelChannelableManipulatorClusterRoleTestRunner added in v0.15.0

func TestChannelChannelableManipulatorClusterRoleTestRunner(
	t *testing.T,
	channelTestRunner testlib.ComponentsTestRunner,
	options ...testlib.SetupClientOption,
)

func TriggerV1Beta1BeforeBrokerHelper added in v0.16.0

func TriggerV1Beta1BeforeBrokerHelper(t *testing.T, triggerName string, client *testlib.Client)

func TriggerV1Beta1ReadyAfterBrokerIncludesSubURI added in v0.16.0

func TriggerV1Beta1ReadyAfterBrokerIncludesSubURI(t *testing.T, triggerName, brokerName string, client *testlib.Client)

func TriggerV1Beta1ReadyBrokerReadyHelper added in v0.16.0

func TriggerV1Beta1ReadyBrokerReadyHelper(t *testing.T, triggerName, brokerName string, client *testlib.Client)

func TriggerV1Beta1ReadyIncludesSubURI added in v0.16.0

func TriggerV1Beta1ReadyIncludesSubURI(t *testing.T, triggerName string, client *testlib.Client)

Types

type SetupTracingTestInfrastructureFunc added in v0.16.0

type SetupTracingTestInfrastructureFunc func(
	t *testing.T,
	channel *metav1.TypeMeta,
	client *testlib.Client,
	loggerPodName string,
	senderPublishTrace bool,
) (tracinghelper.TestSpanTree, cetest.EventMatcher)

SetupTracingTestInfrastructureFunc sets up the infrastructure for running tracing tests. It returns the expected trace as well as a string that is expected to be in the logger Pod's logs.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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