helpers

package
v0.36.4 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KafkaBootstrapUrlPlain = "my-cluster-kafka-bootstrap.kafka.svc:9092"

	KafkaClusterName      = "my-cluster"
	KafkaClusterNamespace = "kafka"
)

Variables

View Source
var (
	ImcGVR = schema.GroupVersionResource{Group: "messaging.knative.dev", Version: "v1", Resource: "inmemorychannels"}
)

Functions

func AssureKafkaSourceIsOperational

func AssureKafkaSourceIsOperational(t *testing.T, scope SourceTestScope)

AssureKafkaSourceIsOperational assures that KafkaSource works as intended.

func ChannelSubscriptionScaleReadyHelper

func ChannelSubscriptionScaleReadyHelper(
	ctx context.Context,
	t *testing.T,
	channelTestRunner testlib.ComponentsTestRunner,
	options ...testlib.SetupClientOption)

func CheckKafkaSourceState

func CheckKafkaSourceState(ctx context.Context, c *testlib.Client, name string, inState func(ks *sourcesv1beta1.KafkaSource) (bool, error)) error

CheckKafkaSourceState waits for specified kafka source resource state On timeout reports error

func CheckRADeployment

func CheckRADeployment(ctx context.Context, c *testlib.Client, name string, inState func(deps *appsv1.DeploymentList) (bool, error)) error

CheckRADeployment waits for desired state of receiver adapter On timeout reports error

func MustCreateKafkaUserForTopic

func MustCreateKafkaUserForTopic(client *testlib.Client, clusterName, clusterNamespace, authenticationType, userName, topicName string)

func MustCreateTopic

func MustCreateTopic(client *testlib.Client, clusterName, clusterNamespace, topicName string, partitions int)

func MustPublishKafkaMessage

func MustPublishKafkaMessage(client *testlib.Client, bootstrapServer string, topic string, key string, headers map[string]string, value string)

func MustPublishKafkaMessageViaBinding

func MustPublishKafkaMessageViaBinding(client *testlib.Client, selector map[string]string, topic string, key string, headers map[string]string, value string)

func TestKafkaBinding

func TestKafkaBinding(t *testing.T)

func TestKafkaSourceClaims

func TestKafkaSourceClaims(t *testing.T)

func TestKafkaSourceUpdate

func TestKafkaSourceUpdate(t *testing.T)

func WaitForKafkaResourceReady

func WaitForKafkaResourceReady(ctx context.Context, client *testlib.Client, namespace, name string, gvr schema.GroupVersionResource) error

func WaitForTopicReady deprecated

func WaitForTopicReady(ctx context.Context, client *testlib.Client, namespace, name string, gvr schema.GroupVersionResource) error

Deprecated: Use WaitForKafkaResourceReady instead.

Types

type SourceTestScope

type SourceTestScope func(auth, testCase, version string) bool

SourceTestScope returns true if we should proceed with given test case.

Jump to

Keyboard shortcuts

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