steps

package
v1.7.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ComponentTestGroup    = "component-test" // kafka group name for the component test consumer
	DrainTopicTimeout     = 1 * 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      = 5 * time.Second  // maximum time that the component test consumer will wait for a kafka event
)

Variables

View Source
var (
	BuildTime string = "1625046891"
	GitCommit string = "7434fe334d9f51b7239f978094ea29d10ac33b16"
	Version   string = ""
)

Functions

This section is empty.

Types

type Component

type Component struct {
	cmpntest.ErrorFeature

	RecipeAPI     *httpfake.HTTPFake
	DatasetAPI    *httpfake.HTTPFake
	ImportAPI     *httpfake.HTTPFake
	CantabularSrv *httpfake.HTTPFake
	// contains filtered or unexported fields
}

func NewComponent

func NewComponent() *Component

func (*Component) Close

func (c *Component) Close()

Close runs after each scenario

func (*Component) RegisterSteps

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

func (*Component) Reset

func (c *Component) Reset() error

Reset runs before each scenario. It re-initialises the service under test and the api mocks. Note that the service under test should not be started yet to prevent race conditions if it tries to call un-initialised dependencies (steps)

Jump to

Keyboard shortcuts

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