steps

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 20 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(mongoURI string) (*PermissionsComponent, error)

NewPermissionsComponent initializes mock server and in-memory 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(_ *config.Config, _ string, _ string, _ 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)

Jump to

Keyboard shortcuts

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