helpers

package
v0.11.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BrokerTracingTestHelper added in v0.10.0

func BrokerTracingTestHelper(t *testing.T, channel metav1.TypeMeta, setupClient SetupClientFunc)

BrokerTracingTestHelper runs the Broker tracing test using the given TypeMeta.

func BrokerTracingTestHelperWithChannelTestRunner added in v0.10.0

func BrokerTracingTestHelperWithChannelTestRunner(
	t *testing.T,
	channelTestRunner common.ChannelTestRunner,
	setupClient SetupClientFunc,
)

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

func ChannelTracingTestHelper added in v0.10.0

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

ChannelTracingTestHelper runs the Channel tracing test using the given TypeMeta.

func ChannelTracingTestHelperWithChannelTestRunner added in v0.10.0

func ChannelTracingTestHelperWithChannelTestRunner(
	t *testing.T,
	channelTestRunner common.ChannelTestRunner,
	setupClient SetupClientFunc,
)

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

func SingleEventHelperForChannelTestHelper

func SingleEventHelperForChannelTestHelper(t *testing.T, encoding string, channelTestRunner common.ChannelTestRunner)

SingleEventHelperForChannelTestHelper is the helper function for header_test

Types

type SetupClientFunc added in v0.10.0

type SetupClientFunc func(*common.Client) error

SetupClientFunc sets up the client for running tracing tests. It does the equivalent of client.Setup().

var SetupClientFuncNoop SetupClientFunc = func(*common.Client) error {
	return nil
}

SetupClientFuncNoop is a SetupClientFunc that does nothing.

type SetupInfrastructureFunc added in v0.10.0

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

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