helpers

package
v0.15.4 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChannelNameSuffix = "Channel"
)
View Source
const (
	SubscribableAnnotationKey = "messaging.knative.dev/subscribable"
)

Variables

This section is empty.

Functions

func BrokerTracingTestHelper added in v0.10.0

func BrokerTracingTestHelper(t *testing.T, brokerClass string, channel metav1.TypeMeta, setupClient lib.SetupClientOption)

BrokerTracingTestHelper runs the Broker tracing test using the given TypeMeta.

func BrokerTracingTestHelperWithChannelTestRunner added in v0.10.0

func BrokerTracingTestHelperWithChannelTestRunner(
	t *testing.T,
	brokerClass string,
	channelTestRunner lib.ChannelTestRunner,
	setupClient lib.SetupClientOption,
)

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

func ChannelCRDMetadataTestHelperWithChannelTestRunner added in v0.15.0

func ChannelCRDMetadataTestHelperWithChannelTestRunner(
	t *testing.T,
	channelTestRunner lib.ChannelTestRunner,
	options ...lib.SetupClientOption,
)

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

func ChannelCRDNameTestHelperWithChannelTestRunner added in v0.15.0

func ChannelCRDNameTestHelperWithChannelTestRunner(
	t *testing.T,
	channelTestRunner lib.ChannelTestRunner,
	options ...lib.SetupClientOption,
)

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

func ChannelSpecTestHelperWithChannelTestRunner added in v0.15.0

func ChannelSpecTestHelperWithChannelTestRunner(
	t *testing.T,
	channelTestRunner lib.ChannelTestRunner,
	options ...lib.SetupClientOption,
)

func ChannelStatusSubscriberTestHelperWithChannelTestRunner added in v0.15.0

func ChannelStatusSubscriberTestHelperWithChannelTestRunner(
	t *testing.T,
	channelTestRunner lib.ChannelTestRunner,
	options ...lib.SetupClientOption,
)

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

func ChannelStatusTestHelperWithChannelTestRunner added in v0.15.0

func ChannelStatusTestHelperWithChannelTestRunner(
	t *testing.T,
	channelTestRunner lib.ChannelTestRunner,
	options ...lib.SetupClientOption,
)

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

func ChannelTracingTestHelper added in v0.10.0

func ChannelTracingTestHelper(t *testing.T, channel metav1.TypeMeta, setupClient lib.SetupClientOption)

ChannelTracingTestHelper runs the Channel tracing test using the given TypeMeta.

func ChannelTracingTestHelperWithChannelTestRunner added in v0.10.0

func ChannelTracingTestHelperWithChannelTestRunner(
	t *testing.T,
	channelTestRunner lib.ChannelTestRunner,
	setupClient lib.SetupClientOption,
)

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

func SingleEventHelperForChannelTestHelper

func SingleEventHelperForChannelTestHelper(t *testing.T, encoding string,
	channelTestRunner lib.ChannelTestRunner,
	options ...lib.SetupClientOption,
)

SingleEventHelperForChannelTestHelper is the helper function for header_test

func TestChannelChannelableManipulatorClusterRoleTestRunner added in v0.15.0

func TestChannelChannelableManipulatorClusterRoleTestRunner(
	t *testing.T,
	channelTestRunner lib.ChannelTestRunner,
	options ...lib.SetupClientOption,
)

Types

type SetupInfrastructureFunc added in v0.10.0

type SetupInfrastructureFunc func(
	t *testing.T,
	channel *metav1.TypeMeta,
	client *lib.Client,
	loggerPodName string,
	tc TracingTestCase,
) (tracinghelper.TestSpanTree, lib.EventMatchFunc)

SetupInfrastructureFunc 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.

type TracingTestCase added in v0.10.0

type TracingTestCase struct {
	// IncomingTraceId controls whether the original request is sent to the Broker/Channel already
	// has a trace ID associated with it by the sender.
	IncomingTraceId bool
	// Istio controls whether the Pods being created for the test (sender, transformer, logger,
	// etc.) have Istio sidecars. It does not affect the Channel Pods.
	Istio bool
}

TracingTestCase is the test case information for tracing tests.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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