steps

package
v1.59.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 21 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const WaitEventTimeout = 5 * time.Second // maximum time that the component test consumer will wait for an elasticsearch call

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	APIFeature           *componentTest.APIFeature
	AuthFeature          *componentTest.AuthorizationFeature
	Cfg                  *config.Config
	ErrorFeature         componentTest.ErrorFeature
	FakeElasticSearchAPI *FakeAPI
	FakeNLPSearchAPI     *FakeAPI
	HTTPServer           *http.Server
	ServiceRunning       bool

	StartTime time.Time
	// contains filtered or unexported fields
}

Component contains all the information to create a component test

func SearchAPIComponent

func SearchAPIComponent(authFeature *componentTest.AuthorizationFeature) (c *Component, err error)

SearchAPIComponent creates a search api component

func (*Component) Close

func (c *Component) Close() error

Close closes the search api component

func (*Component) InitAPIFeature

func (c *Component) InitAPIFeature() *componentTest.APIFeature

InitAPIFeature initialises the ApiFeature that's contained within a specific JobsFeature.

func (*Component) InitialiseService

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

InitialiseService returns the http.Handler that's contained within the component.

func (*Component) RegisterSteps

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

RegisterSteps registers the specific steps needed to do component tests for the search api

func (*Component) Reset

func (c *Component) Reset() *Component

Reset resets the search api component (should not reset Fake APIs)

type FakeAPI

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

FakeAPI contains all the information for a fake component API

func NewFakeAPI

func NewFakeAPI(t testing.TB) *FakeAPI

NewFakeAPI creates a new fake component API

func (*FakeAPI) Close

func (f *FakeAPI) Close()

Close closes the fake API

func (*FakeAPI) Reset

func (f *FakeAPI) Reset()

Reset resets the fake API

Jump to

Keyboard shortcuts

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