steps

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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

type LegacyComponent added in v1.22.0

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

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

LegacyComponent contains all the information to create a component test

func LegacySearchAPIComponent added in v1.22.0

func LegacySearchAPIComponent(authFeature *componentTest.AuthorizationFeature) (c *LegacyComponent, err error)

LegacySearchAPIComponent creates a search api component

func (*LegacyComponent) Close added in v1.22.0

func (c *LegacyComponent) Close() error

Close closes the search api component

func (*LegacyComponent) InitAPIFeature added in v1.22.0

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

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

func (*LegacyComponent) InitialiseService added in v1.22.0

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

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

func (*LegacyComponent) RegisterSteps added in v1.22.0

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

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

func (*LegacyComponent) Reset added in v1.22.0

func (c *LegacyComponent) Reset() *LegacyComponent

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

Jump to

Keyboard shortcuts

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