Documentation ¶
Index ¶
- func BrokerChannelFlowTestHelper(t *testing.T, brokerClass string, channelTestRunner lib.ChannelTestRunner, ...)
- func BrokerDeadLetterSinkTestHelper(t *testing.T, brokerClass string, channelTestRunner lib.ChannelTestRunner, ...)
- func ChannelChainTestHelper(t *testing.T, channelTestRunner lib.ChannelTestRunner, ...)
- func ChannelClusterDefaulterTestHelper(t *testing.T, channelTestRunner lib.ChannelTestRunner, ...)
- func ChannelDeadLetterSinkTestHelper(t *testing.T, channelTestRunner lib.ChannelTestRunner, ...)
- func ChannelNamespaceDefaulterTestHelper(t *testing.T, channelTestRunner lib.ChannelTestRunner, ...)
- func EventTransformationForSubscriptionTestHelper(t *testing.T, channelTestRunner lib.ChannelTestRunner, ...)
- func EventTransformationForTriggerTestHelper(t *testing.T, brokerClass string, channelTestRunner lib.ChannelTestRunner, ...)
- func ParallelTestHelper(t *testing.T, channelTestRunner lib.ChannelTestRunner, ...)
- func SequenceTestHelper(t *testing.T, channelTestRunner lib.ChannelTestRunner, ...)
- func SetupPerformanceImageRBAC(client *lib.Client)
- func SingleEventForChannelTestHelper(t *testing.T, encoding string, subscriptionVersion SubscriptionVersion, ...)
- func TestBrokerWithConfig(t *testing.T, brokerClass string, channelTestRunner lib.ChannelTestRunner, ...)
- func TestBrokerWithManyTriggers(t *testing.T, brokerCreator BrokerCreator, shouldLabelNamespace bool)
- func TestTriggerNoBroker(t *testing.T, channel string, brokerCreator BrokerCreator)
- func TestWithPerformanceImage(st *testing.T, expectedAggregatorRecords int, ...)
- type BrokerCreator
- type PerformanceImageResults
- type SubscriptionVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BrokerChannelFlowTestHelper ¶
func BrokerChannelFlowTestHelper(t *testing.T, brokerClass string, channelTestRunner lib.ChannelTestRunner, options ...lib.SetupClientOption)
BrokerChannelFlowTestHelper is the helper function for broker_channel_flow_test
func BrokerDeadLetterSinkTestHelper ¶ added in v0.12.0
func BrokerDeadLetterSinkTestHelper(t *testing.T, brokerClass string, channelTestRunner lib.ChannelTestRunner, options ...lib.SetupClientOption)
BrokerDeadLetterSinkTestHelper is the helper function for broker_dls_test
func ChannelChainTestHelper ¶
func ChannelChainTestHelper(t *testing.T, channelTestRunner lib.ChannelTestRunner, options ...lib.SetupClientOption)
ChannelChainTestHelper is the helper function for channel_chain_test
func ChannelClusterDefaulterTestHelper ¶
func ChannelClusterDefaulterTestHelper(t *testing.T, channelTestRunner lib.ChannelTestRunner, options ...lib.SetupClientOption)
ChannelClusterDefaulterTestHelper is the helper function for channel_defaulter_test
func ChannelDeadLetterSinkTestHelper ¶ added in v0.11.0
func ChannelDeadLetterSinkTestHelper(t *testing.T, channelTestRunner lib.ChannelTestRunner, options ...lib.SetupClientOption)
ChannelDeadLetterSinkTestHelper is the helper function for channel_deadlettersink_test
func ChannelNamespaceDefaulterTestHelper ¶
func ChannelNamespaceDefaulterTestHelper(t *testing.T, channelTestRunner lib.ChannelTestRunner, options ...lib.SetupClientOption)
ChannelNamespaceDefaulterTestHelper is the helper function for channel_defaulter_test
func EventTransformationForSubscriptionTestHelper ¶
func EventTransformationForSubscriptionTestHelper(t *testing.T, channelTestRunner lib.ChannelTestRunner, options ...lib.SetupClientOption)
EventTransformationForSubscriptionTestHelper is the helper function for channel_event_tranformation_test
func EventTransformationForTriggerTestHelper ¶
func EventTransformationForTriggerTestHelper(t *testing.T, brokerClass string, channelTestRunner lib.ChannelTestRunner, options ...lib.SetupClientOption)
EventTransformationForTriggerTestHelper is the helper function for broker_event_tranformation_test
func ParallelTestHelper ¶ added in v0.15.0
func ParallelTestHelper(t *testing.T, channelTestRunner lib.ChannelTestRunner, options ...lib.SetupClientOption)
func SequenceTestHelper ¶ added in v0.15.0
func SequenceTestHelper(t *testing.T, channelTestRunner lib.ChannelTestRunner, options ...lib.SetupClientOption)
func SetupPerformanceImageRBAC ¶ added in v0.11.0
func SingleEventForChannelTestHelper ¶
func SingleEventForChannelTestHelper(t *testing.T, encoding string, subscriptionVersion SubscriptionVersion, channelVersion string, channelTestRunner lib.ChannelTestRunner, options ...lib.SetupClientOption)
SingleEventForChannelTestHelper is the helper function for channel_single_event_test channelVersion can be used to override which version you want to create the subscription against. For example, you could create a v1beta1 channel, but create a subscription to its v1alpha1 version by using channelVersion to override it. channelVersion == "" means that the version of the channel subscribed to is not modified.
func TestBrokerWithConfig ¶ added in v0.13.0
func TestBrokerWithConfig(t *testing.T, brokerClass string, channelTestRunner lib.ChannelTestRunner, options ...lib.SetupClientOption)
TestBrokerWithConfig is the helper function for broker_with_config_test
func TestBrokerWithManyTriggers ¶ added in v0.15.0
func TestBrokerWithManyTriggers(t *testing.T, brokerCreator BrokerCreator, shouldLabelNamespace bool)
If shouldLabelNamespace is set to true this test annotates the testing namespace so that a default broker is created. It then binds many triggers with different filtering patterns to the broker created by brokerCreator, and sends different events to the broker's address. Finally, it verifies that only the appropriate events are routed to the subscribers.
func TestTriggerNoBroker ¶ added in v0.15.0
func TestTriggerNoBroker(t *testing.T, channel string, brokerCreator BrokerCreator)
TestTriggerNoBroker will create a Trigger with a non-existent broker, then it will ensure the Status is correctly reflected as failed with BrokerDoesNotExist. Then it will create the broker and ensure that Trigger / Broker will get to Ready state.
func TestWithPerformanceImage ¶ added in v0.11.0
func TestWithPerformanceImage(st *testing.T, expectedAggregatorRecords int, setupEnv func(t *testing.T, consumerHostname string, aggregatorHostname string, client *lib.Client), assertResults func(*testing.T, *PerformanceImageResults))
This function setups RBAC, services and aggregator pod. It DOESN'T setup channel, broker nor sender and receiver pod(s). The setup of these resources MUST be done inside `setupEnv` function
Types ¶
type BrokerCreator ¶ added in v0.15.0
BrokerCreator creates a broker and returns its broker name. TestBrokerWithManyTriggers will wait for the broker to become ready.
func ChannelBasedBrokerCreator ¶ added in v0.15.0
func ChannelBasedBrokerCreator(channel metav1.TypeMeta, brokerClass string) BrokerCreator
ChannelBasedBrokerCreator creates a BrokerCreator that creates a broker based on the channel parameter.
type PerformanceImageResults ¶ added in v0.11.0
type SubscriptionVersion ¶ added in v0.15.0
type SubscriptionVersion string
const ( SubscriptionV1alpha1 SubscriptionVersion = "v1alpha1" SubscriptionV1beta1 SubscriptionVersion = "v1beta1" )
Source Files ¶
- broker_channel_flow_test_helper.go
- broker_dls_test_helper.go
- broker_event_transformation_test_helper.go
- broker_test_helper.go
- broker_with_config_helper.go
- channel_chain_test_helper.go
- channel_defaulter_test_helper.go
- channel_dls_test_helper.go
- channel_event_tranformation_test_helper.go
- channel_single_event_helper.go
- parallel_test_helper.go
- performance_image_test_helper.go
- sequence_test_helper.go
- trigger_no_broker_test_helper.go