testutils

package
v0.0.0-...-c6cd810 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestEsClientWrapper

type TestEsClientWrapper struct {
	// contains filtered or unexported fields
}

TestEsClientWrapper is used in tests to query the uploaded data from ES, and do some cleanup after the test run.

func NewTestEsClientWrapper

func NewTestEsClientWrapper(testESURL string) *TestEsClientWrapper

NewTestEsClientWrapper creates a new EsClientWrapper.

func (*TestEsClientWrapper) DeleteIndex

func (testEsClient *TestEsClientWrapper) DeleteIndex(indexName string)

func (*TestEsClientWrapper) QueryDocCountInIndex

func (testEsClient *TestEsClientWrapper) QueryDocCountInIndex(indexName string) int

type TestRabbitMqProducer

type TestRabbitMqProducer struct {
	// contains filtered or unexported fields
}

TestRabbitMQProducer is a rabbitMQ producer used in tests to publish test input messages into a queue.

func NewTestRabbitMqProducer

func NewTestRabbitMqProducer(
	rabbitMqURL string,
	exchangeName string,
	routingKey string) *TestRabbitMqProducer

NewTestRabbitMqProducer creates a new test producer that publishes messages to rabbitmq.

func (*TestRabbitMqProducer) CloseChannelAndConnection

func (producer *TestRabbitMqProducer) CloseChannelAndConnection()

CloseChannelAndConnection closes the channel and connection received in parameter.

func (*TestRabbitMqProducer) Connect

func (producer *TestRabbitMqProducer) Connect()

Connect opens a channel and a connection.

func (*TestRabbitMqProducer) PublishTestInput

func (producer *TestRabbitMqProducer) PublishTestInput(
	testData testmodels.TestProcessedData,
)

Jump to

Keyboard shortcuts

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