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 (*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
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 NewMongoFeature(ef componenttest.ErrorFeature, g service.Generator, cfg *config.Config) *MongoFeature
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()
Click to show internal directories.
Click to hide internal directories.