steps

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 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 PermissionsComponent

type PermissionsComponent struct {
	ErrorFeature componenttest.ErrorFeature

	MongoClient             *mongo.Mongo
	Config                  *config.Config
	HTTPServer              *http.Server
	ServiceRunning          bool
	ApiFeature              *componenttest.APIFeature
	AuthorisationMiddleware authorisation.Middleware
	// contains filtered or unexported fields
}

PermissionsComponent holds the initialized http server, mongo client and configs required for running component tests.

func NewPermissionsComponent

func NewPermissionsComponent(mongoFeature *componenttest.MongoFeature) (*PermissionsComponent, error)

NewPermissionsComponent initializes mock server and inmemory mongodb used for running component tests.

func (*PermissionsComponent) Close

func (f *PermissionsComponent) Close() error

func (*PermissionsComponent) DoGetAuthorisationMiddleware added in v0.6.0

func (f *PermissionsComponent) DoGetAuthorisationMiddleware(ctx context.Context, cfg *authorisation.Config) (authorisation.Middleware, error)

DoGetAuthorisationMiddleware returns an authorisationMock.Middleware object

func (*PermissionsComponent) DoGetHTTPServer

func (f *PermissionsComponent) DoGetHTTPServer(bindAddr string, router http.Handler) service.HTTPServer

func (*PermissionsComponent) DoGetHealthcheckOk

func (f *PermissionsComponent) DoGetHealthcheckOk(cfg *config.Config, buildTime string, gitCommit string, version string) (service.HealthChecker, error)

func (*PermissionsComponent) DoGetMongoDB

DoGetMongoDB returns a MongoDB

func (*PermissionsComponent) InitialiseService

func (f *PermissionsComponent) InitialiseService() (http.Handler, error)

func (*PermissionsComponent) RegisterSteps

func (f *PermissionsComponent) RegisterSteps(ctx *godog.ScenarioContext)

func (*PermissionsComponent) Reset

Jump to

Keyboard shortcuts

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