Documentation
¶
Index ¶
- type FakeAPI
- type MigrationComponent
- func (c *MigrationComponent) AssertSlackAlarmCalled(expectedCount int) error
- func (c *MigrationComponent) AssertSlackAlarmCalledWithSummary(expectedSummary string) error
- func (c *MigrationComponent) AssertSlackInfoCalled(expectedCount int) error
- func (c *MigrationComponent) AssertSlackInfoCalledWithDetails(expectedKey string, expectedValue interface{}) error
- func (c *MigrationComponent) AssertSlackInfoCalledWithSummary(expectedSummary string) error
- func (c *MigrationComponent) AssertSlackWarningCalled(expectedCount int) error
- func (c *MigrationComponent) AssertSlackWarningCalledWithSummary(expectedSummary string) error
- func (c *MigrationComponent) Close() error
- func (c *MigrationComponent) DoGetAppClients(ctx context.Context, cfg *config.Config) *clients.ClientList
- func (c *MigrationComponent) DoGetAuthorisationMiddleware(ctx context.Context, cfg *authorisation.Config) (authorisation.Middleware, error)
- func (c *MigrationComponent) DoGetHTTPServer(bindAddr string, router http.Handler) service.HTTPServer
- func (c *MigrationComponent) DoGetHealthcheckOk(cfg *config.Config, _, _, _ string) (service.HealthChecker, error)
- func (c *MigrationComponent) DoGetMigrator(ctx context.Context, cfg *config.Config, jobService application.JobService, ...) (migrator.Migrator, error)
- func (c *MigrationComponent) DoGetMongoDB(ctx context.Context, cfg config.MongoConfig) (store.MongoDB, error)
- func (c *MigrationComponent) DoGetSlackClient(ctx context.Context, cfg *config.Config) (slack.Clienter, error)
- func (c *MigrationComponent) DoGetTopicCache(ctx context.Context, cfg *config.Config, clientList *clients.ClientList) (*cache.TopicCache, chan error, error)
- func (c *MigrationComponent) GetMockSlackClient() *slackMocks.ClienterMock
- func (c *MigrationComponent) InitAPIFeature() *componenttest.APIFeature
- func (c *MigrationComponent) InitialiseService() (http.Handler, error)
- func (c *MigrationComponent) RegisterSteps(ctx *godog.ScenarioContext)
- func (c *MigrationComponent) Reset() error
- func (c *MigrationComponent) ResetMockSlackClient()
- func (c *MigrationComponent) Restart() error
- func (c *MigrationComponent) SeedDatabase() error
- func (c *MigrationComponent) Start() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeAPI ¶ added in v0.7.0
type FakeAPI struct {
// contains filtered or unexported fields
}
FakeAPI contains all the information for a fake component API
func NewFakeAPI ¶ added in v0.7.0
func NewFakeAPI() *FakeAPI
NewFakeAPI creates a new fake component API
type MigrationComponent ¶ added in v0.6.0
type MigrationComponent struct {
componenttest.ErrorFeature
Config *config.Config
HTTPServer *http.Server
ServiceRunning bool
MongoClient *mongo.Mongo
StartTime time.Time
FakeAPIRouter *FakeAPI
AuthorisationMiddleware authorisation.Middleware
MockSlackClient *slackMocks.ClienterMock
Migrator migrator.Migrator
// contains filtered or unexported fields
}
func NewMigrationComponent ¶ added in v0.6.0
func NewMigrationComponent(mongoFeat *componenttest.MongoFeature, authFeat *componenttest.AuthorizationFeature) (*MigrationComponent, error)
func (*MigrationComponent) AssertSlackAlarmCalled ¶ added in v0.26.0
func (c *MigrationComponent) AssertSlackAlarmCalled(expectedCount int) error
AssertSlackAlarmCalled asserts that SendAlarm was called on the mock Slack client
func (*MigrationComponent) AssertSlackAlarmCalledWithSummary ¶ added in v0.26.0
func (c *MigrationComponent) AssertSlackAlarmCalledWithSummary(expectedSummary string) error
AssertSlackAlarmCalledWithSummary asserts that SendAlarm was called with a specific summary
func (*MigrationComponent) AssertSlackInfoCalled ¶ added in v0.26.0
func (c *MigrationComponent) AssertSlackInfoCalled(expectedCount int) error
AssertSlackInfoCalled asserts that SendInfo was called on the mock Slack client
func (*MigrationComponent) AssertSlackInfoCalledWithDetails ¶ added in v0.26.0
func (c *MigrationComponent) AssertSlackInfoCalledWithDetails(expectedKey string, expectedValue interface{}) error
AssertSlackInfoCalledWithDetails asserts that SendInfo was called with specific details
func (*MigrationComponent) AssertSlackInfoCalledWithSummary ¶ added in v0.26.0
func (c *MigrationComponent) AssertSlackInfoCalledWithSummary(expectedSummary string) error
AssertSlackInfoCalledWithSummary asserts that SendInfo was called with a specific summary
func (*MigrationComponent) AssertSlackWarningCalled ¶ added in v0.26.0
func (c *MigrationComponent) AssertSlackWarningCalled(expectedCount int) error
AssertSlackWarningCalled asserts that SendWarning was called on the mock Slack client
func (*MigrationComponent) AssertSlackWarningCalledWithSummary ¶ added in v0.26.0
func (c *MigrationComponent) AssertSlackWarningCalledWithSummary(expectedSummary string) error
AssertSlackWarningCalledWithSummary asserts that SendWarning was called with a specific summary
func (*MigrationComponent) Close ¶ added in v0.6.0
func (c *MigrationComponent) Close() error
func (*MigrationComponent) DoGetAppClients ¶ added in v0.6.0
func (c *MigrationComponent) DoGetAppClients(ctx context.Context, cfg *config.Config) *clients.ClientList
func (*MigrationComponent) DoGetAuthorisationMiddleware ¶ added in v0.9.0
func (c *MigrationComponent) DoGetAuthorisationMiddleware(ctx context.Context, cfg *authorisation.Config) (authorisation.Middleware, error)
func (*MigrationComponent) DoGetHTTPServer ¶ added in v0.6.0
func (c *MigrationComponent) DoGetHTTPServer(bindAddr string, router http.Handler) service.HTTPServer
func (*MigrationComponent) DoGetHealthcheckOk ¶ added in v0.6.0
func (c *MigrationComponent) DoGetHealthcheckOk(cfg *config.Config, _, _, _ string) (service.HealthChecker, error)
func (*MigrationComponent) DoGetMigrator ¶ added in v0.6.0
func (c *MigrationComponent) DoGetMigrator(ctx context.Context, cfg *config.Config, jobService application.JobService, clientList *clients.ClientList, slackClient slack.Clienter, topicCache *cache.TopicCache) (migrator.Migrator, error)
func (*MigrationComponent) DoGetMongoDB ¶ added in v0.6.0
func (c *MigrationComponent) DoGetMongoDB(ctx context.Context, cfg config.MongoConfig) (store.MongoDB, error)
func (*MigrationComponent) DoGetSlackClient ¶ added in v0.26.0
func (*MigrationComponent) DoGetTopicCache ¶ added in v0.27.0
func (c *MigrationComponent) DoGetTopicCache(ctx context.Context, cfg *config.Config, clientList *clients.ClientList) (*cache.TopicCache, chan error, error)
func (*MigrationComponent) GetMockSlackClient ¶ added in v0.26.0
func (c *MigrationComponent) GetMockSlackClient() *slackMocks.ClienterMock
func (*MigrationComponent) InitAPIFeature ¶ added in v0.6.0
func (c *MigrationComponent) InitAPIFeature() *componenttest.APIFeature
func (*MigrationComponent) InitialiseService ¶ added in v0.6.0
func (c *MigrationComponent) InitialiseService() (http.Handler, error)
func (*MigrationComponent) RegisterSteps ¶ added in v0.6.0
func (c *MigrationComponent) RegisterSteps(ctx *godog.ScenarioContext)
func (*MigrationComponent) Reset ¶ added in v0.6.0
func (c *MigrationComponent) Reset() error
func (*MigrationComponent) ResetMockSlackClient ¶ added in v0.26.0
func (c *MigrationComponent) ResetMockSlackClient()
ResetMockSlackClient resets the mock Slack client call history
func (*MigrationComponent) Restart ¶ added in v0.9.1
func (c *MigrationComponent) Restart() error
func (*MigrationComponent) SeedDatabase ¶ added in v0.15.0
func (c *MigrationComponent) SeedDatabase() error
func (*MigrationComponent) Start ¶ added in v0.9.1
func (c *MigrationComponent) Start() error