testutil

package
v5.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootDir string

Functions

func AssertArraysEquals

func AssertArraysEquals(t *testing.T, expected, actual []string)

func AssertContainSubstring

func AssertContainSubstring(t *testing.T, expected, actual string)

func AssertContains

func AssertContains(t *testing.T, expected string, array []string)

func AssertContainsNot

func AssertContainsNot(t *testing.T, unexpected string, array []string)

func AssertEquals

func AssertEquals(t *testing.T, expected, actual string)

func AssertErrorContains

func AssertErrorContains(t *testing.T, expected string, err error)

func AssertErrorContainsOneOf

func AssertErrorContainsOneOf(t *testing.T, expected []string, err error)

func CreateAvroTopic

func CreateAvroTopic(t *testing.T, topicPrefix, keySchema, valueSchema string, flags ...string) string

func CreateClient

func CreateClient(t *testing.T) sarama.Client

func CreateConsumerGroup

func CreateConsumerGroup(t *testing.T, groupPrefix string, topics ...string) string

func CreateTopic

func CreateTopic(t *testing.T, topicPrefix string, flags ...string) string

func GetPrefixedName

func GetPrefixedName(prefix string) string

func MarkOffset

func MarkOffset(t *testing.T, client sarama.Client, groupName string, topic string, partition int32, offset int64)

func ProduceMessage

func ProduceMessage(t *testing.T, topic, key, value string, expectedPartition, expectedOffset int64)

func ProduceMessageOnPartition

func ProduceMessageOnPartition(t *testing.T, topic, key, value string, partition int32, expectedOffset int64)

func StartIntegrationTest

func StartIntegrationTest(t *testing.T)

func StartIntegrationTestWithContext

func StartIntegrationTestWithContext(t *testing.T, context string)

func StartUnitTest

func StartUnitTest(t *testing.T)

func SwitchContext

func SwitchContext(context string)

func VerifyConsumerGroupOffset

func VerifyConsumerGroupOffset(t *testing.T, group, topic string, expectedConsumerOffset int)

func VerifyGroupExists

func VerifyGroupExists(t *testing.T, group string)

func VerifyTopicExists

func VerifyTopicExists(t *testing.T, topic string)

func VerifyTopicNotInConsumerGroup

func VerifyTopicNotInConsumerGroup(t *testing.T, group, topic string)

func WithoutBrokerReferences

func WithoutBrokerReferences(output string) string

Types

type KafkaCtlTestCommand

type KafkaCtlTestCommand struct {
	Streams output.IOStreams
	Root    *cobra.Command
	Verbose bool
}

func CreateKafkaCtlCommand

func CreateKafkaCtlCommand() (kafkactl KafkaCtlTestCommand)

func (*KafkaCtlTestCommand) Execute

func (kafkactl *KafkaCtlTestCommand) Execute(args ...string) (cmd *cobra.Command, err error)

func (*KafkaCtlTestCommand) GetStdErr

func (kafkactl *KafkaCtlTestCommand) GetStdErr() string

func (*KafkaCtlTestCommand) GetStdOut

func (kafkactl *KafkaCtlTestCommand) GetStdOut() string

func (*KafkaCtlTestCommand) GetStdOutLines

func (kafkactl *KafkaCtlTestCommand) GetStdOutLines() []string

Jump to

Keyboard shortcuts

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