Documentation ¶
Index ¶
- Constants
- func BrokerConsumerDataPlaneTestHelper(ctx context.Context, t *testing.T, brokerClass string, ...)
- func BrokerDataPlaneNamespaceSetupOption(ctx context.Context, namespace string) testlib.SetupClientOption
- func BrokerDataPlaneSetupHelper(ctx context.Context, client *testlib.Client, brokerClass string, ...) *eventingv1.Broker
- func BrokerIngressDataPlaneTestHelper(ctx context.Context, t *testing.T, brokerClass string, ...)
- func BrokerTracingTestHelperWithChannelTestRunner(ctx context.Context, t *testing.T, brokerClass string, ...)
- func BrokerV1ControlPlaneTest(t *testing.T, brokerCreator BrokerCreator, ...)
- func ChannelCRDMetadataTestHelperWithChannelTestRunner(t *testing.T, channelTestRunner testlib.ComponentsTestRunner, ...)
- func ChannelCRDNameTestHelperWithChannelTestRunner(t *testing.T, channelTestRunner testlib.ComponentsTestRunner, ...)
- func ChannelDataPlaneFailureTestRunner(ctx context.Context, t *testing.T, ...)
- func ChannelDataPlaneSuccessTestRunner(ctx context.Context, t *testing.T, ...)
- func ChannelSpecTestHelperWithChannelTestRunner(t *testing.T, channelTestRunner testlib.ComponentsTestRunner, ...)
- func ChannelStatusSubscriberTestHelperWithChannelTestRunner(ctx context.Context, t *testing.T, ...)
- func ChannelStatusTestHelperWithChannelTestRunner(t *testing.T, channelTestRunner testlib.ComponentsTestRunner, ...)
- func ChannelTracingTestHelperWithChannelTestRunner(ctx context.Context, t *testing.T, ...)
- func ServiceAccountCanDoVerbOnResourceOrFail(client *testlib.Client, gvr schema.GroupVersionResource, subresource string, ...)
- func SingleEventWithKnativeHeaderHelperForChannelTestHelper(ctx context.Context, t *testing.T, encoding cloudevents.Encoding, ...)
- func TestChannelAddressableResolverClusterRoleTestRunner(t *testing.T, channelTestRunner testlib.ComponentsTestRunner, ...)
- func TestChannelChannelableManipulatorClusterRoleTestRunner(ctx context.Context, t *testing.T, ...)
- func ValidateAnnotations(client *testlib.Client, object metav1.TypeMeta, annotationsKey string)
- func ValidateRequiredLabels(client *testlib.Client, object metav1.TypeMeta, labels map[string]string)
- type BrokerCreator
- type EventTypesAnnotationJsonValue
- type SetupTracingTestInfrastructureFunc
Constants ¶
const (
ChannelNameSuffix = "Channel"
)
Variables ¶
This section is empty.
Functions ¶
func BrokerConsumerDataPlaneTestHelper ¶ added in v0.23.0
func BrokerConsumerDataPlaneTestHelper( ctx context.Context, t *testing.T, brokerClass string, brokerTestRunner testlib.ComponentsTestRunner, options ...testlib.SetupClientOption)
At consumer No upgrade of version Attributes received should be the same as produced (attributes may be added) Events are filtered Events are delivered to multiple subscribers Deliveries succeed at least once Replies are accepted and delivered Replies that are unsuccessfully forwarded cause initial message to be redelivered (Very difficult to test, can be ignored)
func BrokerDataPlaneNamespaceSetupOption ¶ added in v0.18.0
func BrokerDataPlaneNamespaceSetupOption(ctx context.Context, namespace string) testlib.SetupClientOption
func BrokerDataPlaneSetupHelper ¶ added in v0.17.0
func BrokerDataPlaneSetupHelper(ctx context.Context, client *testlib.Client, brokerClass string, brokerTestRunner testlib.ComponentsTestRunner) *eventingv1.Broker
func BrokerIngressDataPlaneTestHelper ¶ added in v0.23.0
func BrokerIngressDataPlaneTestHelper( ctx context.Context, t *testing.T, brokerClass string, brokerTestRunner testlib.ComponentsTestRunner, options ...testlib.SetupClientOption)
At ingress Supports CE 0.3 or CE 1.0 via HTTP Supports structured or Binary mode Respond with 2xx on good CE Respond with 400 on bad CE Reject non-POST, non-OPTIONS requests to publish URI (beyond spec?!)
func BrokerTracingTestHelperWithChannelTestRunner ¶ added in v0.10.0
func BrokerTracingTestHelperWithChannelTestRunner( ctx context.Context, t *testing.T, brokerClass string, channelTestRunner testlib.ComponentsTestRunner, setupClient testlib.SetupClientOption, )
BrokerTracingTestHelperWithChannelTestRunner runs the Broker tracing tests for all Channels in the ComponentsTestRunner.
func BrokerV1ControlPlaneTest ¶ added in v0.23.0
func BrokerV1ControlPlaneTest( t *testing.T, brokerCreator BrokerCreator, 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. Broker.Spec.Config is immutable 5. Trigger with Ready broker progresses to Ready 6. Trigger with no broker, updated with broker, updates status to include subscriberURI 7. Ready Trigger includes status.subscriberUri
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. Deprecated, use reconciler-test based tests.
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( ctx context.Context, 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( ctx context.Context, 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( ctx context.Context, 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( ctx context.Context, t *testing.T, channelTestRunner testlib.ComponentsTestRunner, setupClient testlib.SetupClientOption, )
ChannelTracingTestHelperWithChannelTestRunner runs the Channel tracing tests for all Channels in the ComponentsTestRunner.
func ServiceAccountCanDoVerbOnResourceOrFail ¶ added in v0.16.0
func ServiceAccountCanDoVerbOnResourceOrFail(client *testlib.Client, gvr schema.GroupVersionResource, subresource string, saName string, verb string)
Deprecated
func SingleEventWithKnativeHeaderHelperForChannelTestHelper ¶ added in v0.16.0
func SingleEventWithKnativeHeaderHelperForChannelTestHelper( ctx context.Context, t *testing.T, encoding cloudevents.Encoding, channelTestRunner testlib.ComponentsTestRunner, options ...testlib.SetupClientOption, )
SingleEventWithKnativeHeaderHelperForChannelTestHelper is the helper function for header_test
func TestChannelAddressableResolverClusterRoleTestRunner ¶ added in v0.16.0
func TestChannelAddressableResolverClusterRoleTestRunner( t *testing.T, channelTestRunner testlib.ComponentsTestRunner, options ...testlib.SetupClientOption, )
Deprecated
func TestChannelChannelableManipulatorClusterRoleTestRunner ¶ added in v0.15.0
func TestChannelChannelableManipulatorClusterRoleTestRunner( ctx context.Context, t *testing.T, channelTestRunner testlib.ComponentsTestRunner, options ...testlib.SetupClientOption, )
Deprecated
func ValidateAnnotations ¶ added in v0.21.0
Types ¶
type BrokerCreator ¶ added in v0.17.0
Creates a Broker with the given name.
type EventTypesAnnotationJsonValue ¶ added in v0.21.0
type SetupTracingTestInfrastructureFunc ¶ added in v0.16.0
type SetupTracingTestInfrastructureFunc func( ctx context.Context, 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.
Source Files ¶
- broker_control_plane_test_helper.go
- broker_data_plane_test_helper.go
- broker_tracing_test_helper.go
- channel.go
- channel_addressable_resolver_cluster_role_test_helper.go
- channel_channelable_manipulator_cluster_role_test_helper.go
- channel_crd_metadata_test_helper.go
- channel_crd_name_test_helper.go
- channel_data_plane_helper.go
- channel_header_single_event_helper.go
- channel_spec_test_helper.go
- channel_status_subscriber_test_helper.go
- channel_status_test_helper.go
- channel_tracing_test_helper.go
- metadata.go
- rbac.go
- tracing_test_helper.go
- uri.go