steps

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentTestGroup    = "test-consumer-group"
	DrainTopicTimeout     = 10 * time.Second // maximum time to wait for a topic to be drained
	DrainTopicMaxMessages = 1000             // maximum number of messages that will be drained from a topic
	WaitEventTimeout      = 10 * time.Second // maximum time that the component test consumer will wait for a
)

Variables

View Source
var (
	BuildTime = strconv.Itoa(time.Now().Nanosecond())
	GitCommit = "component test commit"
	Version   = "component test version"
)

Functions

func GenerateKafkaConsumer added in v1.2.0

func GenerateKafkaConsumer(ctx context.Context) (*kafka.ConsumerGroup, error)

GenerateKafkaConsumer produces a consumer for specific steps. Currently only for PUT filters/{id}/submit

Types

type CantabularFeature added in v1.5.0

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

func NewCantabularFeature added in v1.5.0

func NewCantabularFeature(t *testing.T, cfg *config.Config) *CantabularFeature

func (*CantabularFeature) RegisterSteps added in v1.5.0

func (cf *CantabularFeature) RegisterSteps(ctx *godog.ScenarioContext)

func (*CantabularFeature) Reset added in v1.5.0

func (cf *CantabularFeature) Reset()

type Component

type Component struct {
	componenttest.ErrorFeature
	AuthFeature       *componenttest.AuthorizationFeature
	APIFeature        *componenttest.APIFeature
	MongoFeature      *MongoFeature
	DatasetFeature    *DatasetFeature
	CantabularFeature *CantabularFeature
	// contains filtered or unexported fields
}

func NewComponent

func NewComponent(t *testing.T) *Component

func (*Component) Close

func (c *Component) Close()

func (*Component) RegisterSteps

func (c *Component) RegisterSteps(ctx *godog.ScenarioContext)

func (*Component) Reset

func (c *Component) Reset()

Reset re-initialises the service under test and the api dependencies

func (*Component) Router added in v1.5.0

func (c *Component) Router() (http.Handler, error)

Router initialises the service, returning the service's (server) router for tests This delayed initialisation is needed to ensure that any changes to the router (or the service in general) as a result of test setup, are picked up

type DatasetFeature added in v1.5.0

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

func NewDatasetFeature added in v1.5.0

func NewDatasetFeature(t *testing.T, cfg *config.Config) *DatasetFeature

func (*DatasetFeature) Close added in v1.5.0

func (df *DatasetFeature) Close()

func (*DatasetFeature) RegisterSteps added in v1.5.0

func (df *DatasetFeature) RegisterSteps(ctx *godog.ScenarioContext)

func (*DatasetFeature) Reset added in v1.5.0

func (df *DatasetFeature) Reset()

type MongoFeature added in v1.5.0

type MongoFeature struct {
	componenttest.ErrorFeature
	*componenttest.MongoFeature
	// contains filtered or unexported fields
}

func NewMongoFeature added in v1.5.0

func (*MongoFeature) Close added in v1.5.0

func (mf *MongoFeature) Close()

func (*MongoFeature) MongoDatastoreFailsForUpdateFilterOutput added in v1.5.0

func (mf *MongoFeature) MongoDatastoreFailsForUpdateFilterOutput()

func (*MongoFeature) MongoDatastoreIsFailing added in v1.5.0

func (mf *MongoFeature) MongoDatastoreIsFailing()

func (*MongoFeature) RegisterSteps added in v1.5.0

func (mf *MongoFeature) RegisterSteps(ctx *godog.ScenarioContext)

func (*MongoFeature) Reset added in v1.5.0

func (mf *MongoFeature) Reset()

Jump to

Keyboard shortcuts

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