helpers

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 34 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 added in v0.27.0

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

AssureKafkaSourceIsOperational assures that KafkaSource works as intended.

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 added in v0.32.0

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 added in v0.27.0

func TestKafkaBinding(t *testing.T)

func TestKafkaSourceClaims added in v0.27.0

func TestKafkaSourceClaims(t *testing.T)

func TestKafkaSourceUpdate added in v0.27.0

func TestKafkaSourceUpdate(t *testing.T)

func WaitForKafkaResourceReady added in v0.32.0

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

func WaitForTopicReady deprecated added in v0.28.0

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

Deprecated: Use WaitForKafkaResourceReady instead.

Types

type SourceTestScope added in v0.27.0

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