Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Check ¶
type Check struct { Name string `json:"name"` Status string `json:"status"` StatusCode int `json:"status_code"` Message string `json:"message"` LastChecked *time.Time `json:"last_checked"` LastSuccess *time.Time `json:"last_success"` LastFailure *time.Time `json:"last_failure"` }
Check represents a health status of a registered app that mimics the real check struct As the component test needs to access fields that are not exported in the real struct
type Component ¶
type Component struct { APIFeature *componentTest.APIFeature ErrorFeature componentTest.ErrorFeature FakeAPIRouter *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 NewSearchControllerComponent ¶
NewSearchControllerComponent creates a search controller component
func (*Component) InitAPIFeature ¶
func (c *Component) InitAPIFeature() *componentTest.APIFeature
InitAPIFeature initialises the ApiFeature that's contained within a specific JobsFeature.
func (*Component) InitialiseService ¶
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 controller
type FakeAPI ¶
type FakeAPI struct {
// contains filtered or unexported fields
}
FakeAPI contains all the information for a fake component API
func NewFakeAPI ¶
NewFakeAPI creates a new fake component API
type HealthCheckTest ¶
type HealthCheckTest struct { Status string `json:"status"` Version healthcheck.VersionInfo `json:"version"` Uptime time.Duration `json:"uptime"` StartTime time.Time `json:"start_time"` Checks []*Check `json:"checks"` }
HealthCheckTest represents a test healthcheck struct that mimics the real healthcheck struct