Documentation ¶
Overview ¶
Package extensiontest define types and functions used to help test packages implementing the extension package interfaces.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockHost ¶
type MockHost struct {
// contains filtered or unexported fields
}
MockHost mocks an extension.Host for test purposes.
func NewMockHost ¶
func NewMockHost() *MockHost
NewMockHost returns a new instance of MockHost with proper defaults for most tests.
func (*MockHost) ReportFatalError ¶
ReportFatalError is used to report to the host that the extension encountered a fatal error (i.e.: an error that the instance can't recover from) after its start function has already returned.
func (*MockHost) WaitForFatalError ¶
WaitForFatalError waits the given amount of time until an error is reported via ReportFatalError. It returns the error, if any, and a bool to indicated if an error was received before the time out.